Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures from VB

Status
Not open for further replies.

VBXL

Programmer
Jul 10, 2001
198
0
0
GB
Hi

Hi I have the following layout

Stored Procedure
Cursor Start
Stored Procedure
Cursor End

when i run this from SQL Query Analyzer it works fine, but running it from VB and it only does the first record. Any reason why ??

Cheers

VBXL
 
Each time you call that second stored proc it returns a recordset. Analyzer displays all of these recordsets for you, but using ado it brings back the first one. I believe there is a way for ado to bring back multiple recordsets, but its not going to bring back 1 with all of the combined data. Try using a Union.

-Adam T. Courtney
Stratagem, Inc.
 
If you wish to look at the second recordset, I believe that you just need to use the following:

Dim adoConn as ADODB.Connection
Dim adoActiveRS as ADODB.Recordset

*********
Create code goes here
also retrieve original recordset.
*********

'Move to the next recordset
set adoActiveRS = adoConn.NextRecordset
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top