Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Mysql and autoincrement Fields
Mysql and autoincrement Fields
Posted: 2008/01/28 08:32
 
Hi!

I have a TADQuery with following SQL-Text:

INSERT INTO table(field1,field2) values (1,2)

after tADQuery.ExecSQL
i want to access the Auto-Inc-Field of the table (not noted in the INSERT-Statement).

How to get the latest AutoInc-Value?

Thanks
Re:Mysql and autoincrement Fields
Posted: 2008/01/28 11:29
 
To return it
But it depends on your DBMS. So, what is it ?
Re:Mysql and autoincrement Fields
Posted: 2008/01/29 00:21
 
Hi!

Thanks for Help. I use MYSQL Version 5.1

Thanks
Re:Mysql and autoincrement Fields
Posted: 2008/01/29 00:32
 
Use LAST_INSERT_ID()