Get Last Inserted ID using CRecordset Class
Posted on 2003-11-28
I have auto increment fields in my database and need
to determine what the Last Inserted ID was for any new record.
As ExecuteSQL does not retrieve any records for you, is there another way
to execute the follwing and retrieve the value?
SELECT LAST_INSERT_ID() As ID
I have worked around it for short term with
but this is only good if I can ensure that no other inserts are made on the table in question.
Thanks in Advance