Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Multiple Recordsets

Status
Not open for further replies.

mike2312

IS-IT--Management
Aug 27, 2003
38
0
0
US
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:
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top