API:FireDAC.Comp.DataSet.TFDAutoIncField
Delphi
TFDAutoIncField = class(TAutoIncField)
C++
class PASCALIMPLEMENTATION TFDAutoIncField : public Data::Db::TAutoIncField
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | FireDAC.Comp.DataSet |
Description
TAutoIncField is a persistent field object for an autoincrement field in a dataset.
FireDAC.Comp.DataSet.TFDAutoIncField inherits from Data.DB.TAutoIncField. All content below this line refers to Data.DB.TAutoIncField.
TAutoIncField is a persistent field object for an autoincrement field in a dataset.
TAutoIncField provides access to an autoincrement field in a table. Autoincrement fields can hold values in the range -2,147,483,648 to 2,147,483,647, and are used as a counter for the records in the dataset. Each record is given a unique value in an autoincrement field, with each record receiving the next highest integer from that of the previously inserted record. Autoincrement fields are commonly used to provide a unique primary key value for a record.
Note: Auto-incrementing fields are a function of the database back-end. An application should not attempt to set a field value for an autoincrement field (with or without a TAutoIncField object).
If you use the Fields editor at design time to create a persistent field component for the auto-incrementing field, you can access it by name at runtime. When using dynamic field components, you can access the TAutoIncField instance using the dataset's Fields property or FieldByName method.