If you have a stored procedure that looks like this:
Here is code that demonstrates how to retrieve the second and third set of results, using the NextRecordSet() method:
CREATE PROCEDURE myProc AS BEGIN SET NOCOUNT ON SELECT columns FROM table1 SELECT columns FROM table2 SELECT columns FROM table3 END |
Here is code that demonstrates how to retrieve the second and third set of results, using the NextRecordSet() method:
<% ' ... ' assuming valid and open object, conn set rs = conn.execute("EXEC myProc") ' process first resultset if not rs.eof then do while not rs.eof response.write rs(0) rs.movenext loop end if ' move to second resultset, using nextRecordSet() set rs = rs.nextRecordSet() if not rs.eof then do while not rs.eof response.write rs(0) rs.movenext loop end if ' move to third resultset, using nextRecordSet() set rs = rs.nextRecordSet() if not rs.eof then do while not rs.eof response.write rs(0) rs.movenext loop end if rs.close: set rs = nothing ' ... %> |
No comments:
Post a Comment