Page 1 of 1

How to get autoincrease integer after insertion?

Posted: Mon 16 Nov 2009 07:47
by lohmann
Hi, all,

The table has an autoincrease type primary key, I would like to get its value after insertion. How can I get this value with an Query component?

Posted: Mon 16 Nov 2009 09:55
by Plash
You can read this value from the corresponding field. For example:

UniQuery.Post;
i := UniQuery.FieldByName('id').AsInteger;