Hello
You have 3 options:
1) You can use ADQuery with SELECT ... FROM ... command, then use standard Insert / Post methods to insert a new record and automatically get last auto incrementing column value.
http://www.da-soft.com/anydac/docu/Auto-Incremental_Fields.html
2) Use ADQuery with INSERT command, and after ExecSQL call use TADConnection.GetLastAutoGenValue method to get last auto generated value.
3) Use ADQuery with "INSERT ...;SELECT LAST_INSERT_ID()" batch command. And call Open to insert a new record and get last auto generated value.
↧