MyDAC

TCustomMyDataSet.InsertId Property

Returns the ID generated for an AUTO_INCREMENT column by the previous query.

Class

TCustomMyDataSet

Syntax

property InsertId: int64;

Remarks

Use the InsertId property to return the ID generated for an AUTO_INCREMENT column by the previous query. Use this function after you have performed an INSERT query into a table that contains an AUTO_INCREMENT field.

If the query does not perform an insertion into a table that contains an AUTO_INCREMENT field the value of InsertId won't be defined.

InsertId property has sense only if SQL includes INSERT statement within itself. In case of SELECT statements, the value of auto-increment field can be obtained from corresponding table fields.

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback