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 > Returning multiple recordsets in an SP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 01:18
bgdeepak bgdeepak is offline
Registered User
 
Join Date: Sep 2003
Posts: 14
Returning multiple recordsets in an SP

Hi,

The recordset returned by the cursor is assigned to an array declared in VB to be used later for processing.
When we assign it to the array in VB it gives the following error:

Run-time error '-2147467259 (80004005))':
CLI0112E Error in assignment. SQLSTATE = 22005

The scenario in detail:
We have three cursors which return three recordsets.The first two recordsets contain data from the tables.
The third recordset is obtained by making a join with two different tables.When we run this procedure in the Stored procedure builder,
we get the results in the output window.They are correct.But when we assign this recordset to an array in VB it gives the above mentioned

error.

cursor1:gets data from a table
cursor2:gets data from a table
cursor3:gets data from two tables based on a join.

There other Scenario was:
When we interchanged the cursors

cursor1:gets data from two tables based on a join.
cursor2:gets data from a table
cursor3:gets data from a table

The recordset returned by the cursor1 was truncated.
Why would the results get truncated.

There was another unbelievable result.
We are passing some parameters to the procedure.Suppose we do not pass those parameters.The procedure works.But the procedure is of no use if we do not pass the parameters.So how do we go about this.

With Regards,
Deepak
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