aspose file tools*
The moose likes JSP and the fly likes @@ Identity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "@@ Identity "No ResultSet was produced" probs in SQL 2000 Driver" Watch "@@ Identity "No ResultSet was produced" probs in SQL 2000 Driver" New topic
Author

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

Amit Roy
Ranch Hand

Joined: Oct 10, 2000
Posts: 132
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 ]

<I>Chance Favours the Prepared minds"</I>
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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 ]

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
Don't get me started about those stupid light bulbs.
 
subject: @@ Identity "No ResultSet was produced" probs in SQL 2000 Driver