If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Getting resultSet from Stored Procs ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-15-03, 11:33
mmarwaha mmarwaha is offline
Registered User
 
Join Date: Sep 2003
Posts: 6
Red face Getting resultSet from Stored Procs ?

Hi - I am facing a typipcal isssue when calling a stored proc from a java application.The stored proc returns a single cursor (resultSet) back.

Though the piece of code that creates the db connection and the CallableStatement is totally independent and proper care is taken that
resultSet object,CallableStatement object,connection object are all closed, still on certain calls to the stored procedure I get the below exception.

com.ibm.db2.jcc.b.SQLException: A result has opened by the previous getResultSet() or getUpdateCount() call, Need to call getMoreResults()

I suspected may be somewhere before the call to this method some other resultSet is open or a CallableStatement is open (the application I am working on uses lot of stored procedure calls returning 1-5 cursors back to the java side), but its difficult to trace out all such areas.Also even if there are open resultsets left prior to calling this stored proc it should not matter since this proc uses totally new connection objects,CallableStatement object and result object.

I am using driver Type 4 - db2jcc.jar on UDB8.0

If anyone has faced similar problems please share your thoughts with me.I am in urgent need of resolving this issue.

Thanks for all the help in advance !
mmarwaha
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On