我有一个存储过程返回6分select语句的结果。 我试图用一个记录集来执行SP和获取记录每个SELECT语句,但我得到0或空记录,当我读到这些,
我怎样才能查询记录集从存储过程中多个SELECT语句?
例如:
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