View Full Version : Getting Autonumber
jgallen23
08-06-2004, 03:18 AM
I'm inserting a user into an access database where the userID is automatically created via autonumber. What is the easiest way for me to get that autonumber and created a variable for that autonumber? I'm coding in ASP (but I figured this would be a better place to ask)
hemebond
08-06-2004, 08:40 AM
When inserting into an auto-increment field, insert a NULL.
jgallen23
08-06-2004, 09:33 AM
I'm not worried about the insert, I want to be able to get that autonumber for future reference, so after I've inserted it, I want to be able to call it with RS("ID")
run a search for it in the ASP forum. I'm sure it was discussed there various times.
Like here
http://www.codingforums.com/showthread.php?s=&threadid=23044&highlight=last+inserted
instead of the userID and the date, you could also insert the ASP-sessionID if that suits you better ...
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.