FireDAC.Comp.DataSet.TFDAutoIncField.ServerAutoIncrement
| [–] Properties | |
|---|---|
| Type: property | |
| Visibility: published | |
| Source: FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp
| |
| Unit: FireDAC.Comp.DataSet | |
| Parent: TFDAutoIncField | |
Delphi
property ServerAutoIncrement: Boolean read FServerAutoIncrement
C++
__property bool ServerAutoIncrement = {read=FServerAutoIncrement, write=SetServerAutoIncrement, default=1};
Description
Specifies when the DBMS generates an autoincrementing value for the new record column.
Set the ServerAutoIncrement property to True (default value), so that the dataset:
- Does not require a value for the column (Required = False).
- Does not include the column into updates (
pfInUpdatenot in ProviderFlags). - Refreshes the column values after posting a new record to a database (AutoGenerateValue =
arAutoInc).
The best result is achieved if ClientAutoIncrement is set to True.
By default, it is not possible to explicitly assign a value to the field is ServerAutoIncrement is True. If you need to explicitly assign a value, then set IdentityInsert to True.