TurboDB VCL Component Library

TTdbTable.SetNextAutoIncValue

TTdbTable        See also

Previous  Top  Next

Sets the starting point for future AutoInc values.

Delphi syntax:

procedure SetNextAutoIncValue(FieldNo: SmallInt; Value: LongInt);

C++ syntax:

void __fastcall SetNextAutoIncValue(SmallInt FieldNo, LongInt Value);

Description

Use this function to define, which values are created for auto-increment fields. Be very careful as setting the next auto-increment to a lower value will result in duplicate auto-increment values in the table. This method is especially helpful after executing a batch move with the RecalcAutoInc property set to false.