• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unable to obtain result set row count

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic