File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "unable to obtain result set row count" Watch "unable to obtain result set row count" New topic
Author

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 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

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,
C
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,
Adam


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: http://aspose.com/file-tools
 
subject: unable to obtain result set row count
 
Similar Threads
set ajax response in parent window field without refreshing the parent window
SQLException: No data found
resultset problem
multiple processes... only want one
how to passing dynamic parameter into jasper report through jsp