G
Guest
Using Office 2003 and Windows XP;
I am using ADO to insert a new record into a table and I need to return the
"RcdID" which is an AutoNumber field.
As I understand, if I can keep the connection open, I can be reasonably sure
that I can return the RcdID for the record just inserted.
I normally use: Set rsADO = CurrentProject.Connection.Execute sSQL
Does this maintain an ADO connection? Or does Execute sever the connection
once the execute is done? If so, can someone please post a generic ADO code
example on how to run an INSERT INTO and then return the AutoNumber value?
Thanks again for your assistance.
I am using ADO to insert a new record into a table and I need to return the
"RcdID" which is an AutoNumber field.
As I understand, if I can keep the connection open, I can be reasonably sure
that I can return the RcdID for the record just inserted.
I normally use: Set rsADO = CurrentProject.Connection.Execute sSQL
Does this maintain an ADO connection? Or does Execute sever the connection
once the execute is done? If so, can someone please post a generic ADO code
example on how to run an INSERT INTO and then return the AutoNumber value?
Thanks again for your assistance.