FireDAC.Comp.DataSet.TFDAutoIncField.ServerAutoIncrement

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ServerAutoIncrement: Boolean read FServerAutoIncrement  write SetServerAutoIncrement default True;

C++

__property bool ServerAutoIncrement = {read=FServerAutoIncrement, write=SetServerAutoIncrement, default=1};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDAutoIncField

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 (pfInUpdate not 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.

See Also