This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to obtain result set row count

 
Charlotte Shearrill
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Passing certain values to my callableStatement causes my resultset to be empty (which is to be expected� sometimes). When my statement is executed (stmt.executeQuery() ) it bombs, giving me the following error message: java.sql.SQLException: unable to obtain result set row count. From {call sp_GetMainName(?,?)}
Should not my executeQuery statement work, moving to the rs.next() statement, skipping the current record if it is empty?

[ Edited by Dave to format code ]

[This message has been edited by David O'Meara (edited December 13, 2001).]
 
Charlotte Shearrill
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am still uncertain about the cause and solution of this problem. in order to get it working, for the present,i had to NOT use my stored procedures.
if anyone finds solution for this please assist me in figuring this out. i will come back to it later after i have gotten more of my other tasks completed.
thanks in advance,
C
 
Adam Hardy
Ranch Hand
Posts: 567
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've not come across that SQL Exception before. Perhaps you should analyse the SQLException more to get some more info out of it. You can use .getErrorCode() to get the vendor-specific database error, and you can use .getNextException() to see if there are any more SQLExceptions (with more info) hanging on the back of it.
You can even call Connection.getWarnings() to see if there is any info there. Good luck,
Adam
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic