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

How to handle the returning the result of two or more SELECTs in SP?

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
US
Hi,

With refernece to the thread - thread183-207754

What if my Stored Procedure returns the results of two or more SELECT statements ? How do we handle such a situation in VB or ASP ?

Thank you,
RR.
__________________________________
The best is yet to come.
 
Use the NextRecordSet method of the recordset object.

See thread701-341667 for an example of reading multiple recordsets.

A quick example using the execute method of the connection object - better to use the command object. Read up on.

Dim cn as new ADOBD.Connection
Dim rs1 as New ADODB.Recordset, rs2 as New ADOBD.Recordset

Set rs1 = cn.Execute("dbo.YourSP")
Set rs2 = rs1.NextRecordset
'- logic to process both recordsets
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top