On MS SQLServer anyway the global variable @@IDENTITY will
always give the last id inserted. I'm pretty sure that's for
the current transaction.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Travis Reeder
Sent: Thursday, June 08, 2000 5:21 PM
To: [EMAIL PROTECTED]
Subject: Getting just added ID column
What's the best way to get the id from the identity column after you just
made an insert and ensuring that you get the correct one? I don't want to
know about the SQL syntax, but rather, is there a way to lock the database
to make sure you get the right one? Or is there some better way that
doesn't require locking?
Travis Reeder
Director, Internet Technologies
Xabre.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets