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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling Two Recordsets from a Stored Proc

Status
Not open for further replies.

joebickley

Programmer
Aug 28, 2001
139
0
0
GB
Hi I have a stored proc that returns two recordsets. Is it possible to use both of them in VBA as i can only seem to pick up the 1st one that is returned.

Thanks

Joe

 
Use the NextRecordSet Method of the ADO recordset.

Example.
Dim rs1 as New ADODB.Recordset, rs2 as New ADODB.Recordsete

rs1.Open yoursp, yourconn

if not rs1.eof then
do something
end if

Set rs2 = rs1.NextRecordset
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top