FireDAC.Comp.DataSet.TFDAutoIncField

From RAD Studio API Documentation
Jump to: navigation, search

Data.DB.TAutoIncFieldData.DB.TIntegerFieldData.DB.TNumericFieldData.DB.TFieldSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTFDAutoIncField
[–] Properties
Type: class
Visibility: public
Source:
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
Unit: FireDAC.Comp.DataSet
Parent: FireDAC.Comp.DataSet

Delphi

TFDAutoIncField = class(TAutoIncField)

C++

class PASCALIMPLEMENTATION TFDAutoIncField : public Data::Db::TAutoIncField

Description

TFDAutoIncField represents an integer auto-incrementing field in a FireDAC dataset.

Use TFDAutoIncField to control the client-side and the server-side auto-incrementing fields.

If FireDAC recognizes the resultset column as an auto-incrementing field, then it automatically creates TFDAutoIncField for this column. Otherwise, you can manually create TFDAutoIncField for the integer column at design time, using the Dataset Editor.

Set the ClientAutoIncrement property to True (default value) and the dataset will generate an auto-incrementing value for each new record. This is at first useful when CachedUpdates is set to True.

Set the ServerAutoIncrement property to True (default value) and the dataset will not require a value for this column and will not include it into updates. However, TFDAutoIncField refreshes after posting a new record to a DBMS.

Set the GeneratorName property to the name of sequence/generator and the dataset will automatically fetch the next value and assign it to the dataset new record column.

See Also

Samples