Quantcast
Channel: DA-SOFT Technologies - Forum
Viewing all articles
Browse latest Browse all 1040

Subject: Which component to use for "SELECT LAST_INSERT_ID() AS..."? - by: Support

$
0
0
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.

Viewing all articles
Browse latest Browse all 1040

Trending Articles