﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / Development  / SELECT @@IDENTITY - sqljdbc driver / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 20 Jun 2013 04:52:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SELECT @@IDENTITY - sqljdbc driver</title><link>http://www.sqlservercentral.com/Forums/Topic788067-145-1.aspx</link><description>select @@identity returns last inserted value of the current session. I think your prepared statement is run in one session and the select @@identity  in another.</description><pubDate>Thu, 17 Sep 2009 04:05:08 GMT</pubDate><dc:creator>ChiragNS</dc:creator></item><item><title>RE: SELECT @@IDENTITY - sqljdbc driver</title><link>http://www.sqlservercentral.com/Forums/Topic788067-145-1.aspx</link><description>Switch to using the OUTPUT clause instead.  It WILL be a single statement and won't have the vulnerabilities that @@identity has.[code]Insert MyTable(Mycolumns)Output inserted.MyIdentityselect MyColumnValue[/code]</description><pubDate>Tue, 15 Sep 2009 06:53:09 GMT</pubDate><dc:creator>Matt Miller (#4)</dc:creator></item><item><title>SELECT @@IDENTITY - sqljdbc driver</title><link>http://www.sqlservercentral.com/Forums/Topic788067-145-1.aspx</link><description>Hi!We are porting a database from SQL Server 2000 to SQL Server 2008 and server is Weblogic server 8.1 SP6. Earlier for SQl 2000 we used jdriver and now we upgraded to sqljdbc 1.2 driver. We have problems with insert staments followed by an SELECT @@IDENTITY. SQLException has raised The statement did not return a result set.We are using prepared statement. Please give me suggestions to resolve this issue.Thanks in advanceAllu</description><pubDate>Tue, 15 Sep 2009 05:19:37 GMT</pubDate><dc:creator>sunjavasri</dc:creator></item></channel></rss>