FireDAC.Comp.DataSet.TFDAutoIncField.IdentityInsert
Delphi
property IdentityInsert: Boolean read GetIdentityInsert write SetIdentityInsert default False;
C++
__property bool IdentityInsert = {read=GetIdentityInsert, write=SetIdentityInsert, default=0};
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | TFDAutoIncField |
Description
Enables the explicit assignment of a value to an autoincrementing column.
Set the IdentityInsert property to True to enable the explicit assignment of a value to an autoincrementing column. By default it is False. This is useful at first for data import batch operations.
Note: Not all DBMSs support assignment of a value to the identity columns.
When a DBMS supports sequences or generators and the application, on the client side, fills the field values from a sequence, then it is required to set IdentityInsert to True.
Example
TFDAutoIncField(FDQuery1.Fields[0]).IdentityInsert := True;
FDQuery1.Append;
FDQuery1.Fields[0].Value := 123;
FDQuery1.Post;