Thanks all - Anna, Ray and Shawn for the replies. I'm on MSSQL (this time) and looks like I have a few options.
Thanks again Moshe -----Original Message----- From: Shawn K. Hall [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 4:02 AM To: [EMAIL PROTECTED] Subject: RE: [ASP] getting last ID Hi Moshe, > in Access, when inserting a new record, all i had > to do was > strUserID = RS.Fields("ID") > before closing the RS, inorder to get that specific ID. > > is this doable in SQL as well? Yep. Here's a good article on it: http://www.aspfaq.com/show.asp?id=2174 You can do a similar thing in MySQL using "LAST_INSERT_ID()" Regards, Shawn K. Hall http://ReliableAnswers.com/ '// ======================================================== "You can't stop the waves, but you can learn to surf." -- Jon Kabat-Zinn --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
