tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <Peter.Crowt...@melandra.com>
Subject RE: JTDS help
Date Tue, 08 Feb 2005 09:56:20 GMT
> From: Charles P. Killmer [mailto:charlesk@netgaintechnology.com] 
> Also the thing that I run into with connection pooling the
> inability to use the SQL Statement of "select @@IDENTITY from table".
> With connection pooling, you run the risk of getting the ID 
> for a record that someone else inserted with the same connection.

I'd assume that the insert statement and the check for @@identity are
done using the same acquired connection, though - otherwise this isn't
safe anyway.  If you're checking for errors from the insert, then you
can be certain that the @@identity is yours.  If you're *not* checking
for errors from the insert before using the value, I'd be a little
concerned about your code :-).

		- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message