I am not sure where ADO questions should go hopefully here is okay.
I have a SP that is returning 5 tables. I am trying to utilize the multiple recordset feature of ADO. Below are some code snippets:
My Connection string:
The snippet where I process the Recordset:
Stepping this through the debugger shows that it dies at the second NextRecordSet. So the firs NextRecordset call has no problems, the second nextrecordset call is where I get problems. I get the following error:
Anyone have any ideas?
I have a SP that is returning 5 tables. I am trying to utilize the multiple recordset feature of ADO. Below are some code snippets:
My Connection string:
Code:
Provider=SQLOLEDB;Server=SOMEIPADDRESS;Initial Catalog=DATABASE;User Id=USER;Password=PASSWORD
The snippet where I process the Recordset:
Code:
set conn=Server.CreateObject("ADODB.Connection")
conn.cursorlocation = 2
conn.Open(objSecurity.adminDatasourceName)
set orecordSet = Server.CreateObject("ADODB.Recordset")
set oCmd = server.CreateObject("ADODB.Command")
With oCmd
.ActiveConnection = conn
.Commandtext = "View_Application2"
.CommandType = 4
.Parameters.Append .CreateParameter("@appid", 3, 1, , Request.QueryString("id"))
.Parameters.Append .CreateParameter("@adminid", 3, 1, , objSecurity.recid)
set orecordset = .execute
end with
if oRecordset.fields("Permissions") = FALSE then
response.redirect("Home.asp")
orecordSet.close()
Set orecordSet = Nothing
Set conn = Nothing
respone.end()
end if ' end if recordCount < 1
set recordset = oRecordset.NextRecordset
set statusRecordset = orecordSet.NextRecordSet <---DIES HERE
set actionRecordset = orecordset.NextRecordSet
set commentsRecordSet = oRecordSet.NextRecordSet
Stepping this through the debugger shows that it dies at the second NextRecordSet. So the firs NextRecordset call has no problems, the second nextrecordset call is where I get problems. I get the following error:
ADODB.Recordset (0x800A0CB3)
Current provider does not support returning multiple recordsets from a single execution.
Anyone have any ideas?