Skip to main content

ftAutoInc

ftAutoInc = 14

Example

function IsGeneratedIdentity(Field: TField): Boolean;
begin
Result := Field.DataType = ftAutoInc;
end;

Usage

ftAutoInc identifies an auto-incrementing signed 32-bit dataset field whose value is normally generated by the dataset or database provider.

Additional Technical Info

ftAutoInc is declaration ordinal 14 of TFieldType. It identifies the Delphi auto-increment field family, generally represented as a signed 32-bit integer whose value is generated by the provider/database.

It is metadata, not an instruction to create an identity column or increment a value. Generation timing, starting value, gaps, rollback behavior, read-only state and retrieval after insert are provider-specific. Do not calculate MAX + 1 in script; that races concurrent writers. Null/new-record placeholders can exist before the generated value is returned.

The example only inspects metadata and was source-reviewed; no dataset/database/runtime/image test ran.

External references

Created 2026-07-15