• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic