Thanks a lot everyone for helping.
I'm all caught up on this now. ;-)
Travis
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Chad Boyd
Sent: Friday, June 09, 2000 10:46 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting just added ID column
The select @@IDENTITY is a per session variable, meaning if someone else
does an insert at the same time you do, they have a different session. So
their session is kept separate from yours. Only the id field of your
inserts will be returned from select @@IDENTITY.
cboyd
-----Original Message-----
From: Travis Reeder [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 09, 2000 11:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting just added ID column
Ya, I know that you can use that to get the newest id column, but what
happens if 2 inserts happen at the same time and you grab the wrong id?
Travis
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Ferghil O'Rourke
Sent: Thursday, June 08, 2000 5:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Getting just added ID column
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
===========================================================================
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
===========================================================================
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