Aug 22, 2002 #1 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.
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.
Aug 22, 2002 #2 cmmrfrds Programmer Feb 13, 2000 4,690 US 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 Upvote 0 Downvote
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