File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes unable to obtain result set row count Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "unable to obtain result set row count" Watch "unable to obtain result set row count" New topic

unable to obtain result set row count

Charlotte Shearrill
Ranch Hand

Joined: Dec 07, 2001
Posts: 34
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 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

Joined: Dec 07, 2001
Posts: 34
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,
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 565
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,

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
I agree. Here's the link:
subject: unable to obtain result set row count
Similar Threads
how to passing dynamic parameter into jasper report through jsp
set ajax response in parent window field without refreshing the parent window
multiple processes... only want one
resultset problem
SQLException: No data found