From: "Glenn F. Henriksen" <gle...@itl.no>
Sent: Saturday, December 02, 2000 1:44 AM
RecordSet = oConnection.Execute("select LAST_INSERT_ID()")
Now I have an empty recordset... What am I doing wrong? I get an error
message from the SQL server if I have them both in the same statment
seperated with ;
I don't know why it is so, but I've had the same problem. My workaround
(which works!) is as follows:
(I assume, that you table is called "YourTable", and the auto_increment
field is called "id")
set RecordSet = oConnection.Execute("select id from YourTable where id =
LAST_INSERT_ID()")
Now you have the value in RecordSet("id")
- Carsten