• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@@ Identity "No ResultSet was produced" probs in SQL 2000 Driver

 
Amit Roy
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I am trying to use the @@ identity feature of SQL which returns the autoid of the current inserted record using the code below..

Is working perfectly fine and returning me the autoid of the record inserted if i use JDBC-ODBC connection
but if i run the same thing using SQL 2000 Driver it is giving me a "No ResultSet set was produced" error can somebody help me with this URGENT I am using a JSP pare,SQL 2000 database and Tomcat 4.1
[ February 14, 2002: Message edited by: Carl Trusiak ]
[ February 14, 2002: Message edited by: Carl Trusiak ]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I'm just going to speculate a little here. I think the problem is the Auto Commitment use of the drivers. The JDBC-ODBC May be using an auto commit of false during the execute of the PreparedStatement and the other, an AutoCommit of true. Doing this means the insert occurs in one isolation while the select occurs in another unrelated one.
Change this to

As a test and see what happens.
[ February 14, 2002: Message edited by: Carl Trusiak ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic