Advantage Database Server

TAdsTable.LastAutoincVal

Advantage TDataSet Descendant

TAdsTable.LastAutoincVal

Advantage TDataSet Descendant

This is the first topic This is the last topic  

TAdsTable.LastAutoincVal

Advantage TDataSet Descendant

This is the first topic This is the last topic  

TAdsTable

Indicates the last AutoIncrement field value that was inserted into the table.

Syntax

property LastAutoincVal : Integer;

Description

Use LastAutoincVal after a record has been appended to the table. If the table contains an AutoIncrement field, this property will store the last value inserted into that field. If the table does not contain an AutoIncrement field, or no record has been inserted, then this property will be set to 0. The LastAutoincVal property is read-only.

With TAdsQuery the LastAutoincVal is available immediately after execution of the INSERT statement.

Note This behavior differs from TAdsQuery.LastAutoincVal.

 

Note The autoinc value returned is client-specific, and because of concurrent database access, is not guaranteed to be the absolute last autoinc value in the table.