I have a Stored proc which returns 6 select statement results. I'm trying to use one record set to execute sp and get records for each select statement but i get 0 or empty records when i read them,
How can i query record set with multiple select statements from stored procedure?
ex:
Set rs = Server.CreateObject("ADODB.Recordset")
strSql = "Exec [dbo].[xyz] '"¶m1&"', '"¶m2&"', '"¶m3& "'"
rs.open strSql,CN,3,3
Do While Not rs.EOF
if rs.recordcount > 0 then
r1 = rs.GetString(, , ", ", "<BR>" )
else
r1 = 0
end if
rs.MoveNext
Loop
Set rs = rs.NextRecordset()
Do While Not rs.EOF
if rs.recordcount > 0 then
r2 = rs.GetString(, , ", ", "<BR>" )
else
r2 = 0
end if
rs.MoveNext
Loop