asked on
CREATE PROCEDURE myProc
AS
BEGIN
SET NOCOUNT ON
SELECT columns FROM table1
SELECT columns FROM table2
SELECT columns FROM table3
END
<%
' ...
' 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
' ...
%>