I am trying to display the results of a store procedure, but cannot seem to get the Move Next to work for me. Without it I am currently only getting the first row. Here is what I have so far:

Set x1 = server.CreateObject("ADODB.Command")
Set RS = server.CreateObject("ADODB.Recordset")
	With x1
	.ActiveConnection = gObjConnect
	.CommandType = adCmdStoredProc
	.CommandText = "storedProc_OpenSPInvoiceList"
	.Parameters.Append  .CreateParameter("@Customer_ID", adInteger,adParamInput,,session("UserLocationId"))	
	RS = .Execute
	End With

formString = formString & "<td>"&RS("ratetotal")&"</td>"
RS.MoveNext

Here is the error I get when I try to do RS.anything...
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'MoveNext'

I have searched all over for a solution, but have not been able to find anything that will help.

Thanks...

I finally figured it out...

Here is the problem section:

Set x1 = server.CreateObject("ADODB.Command")
'Set RS = server.CreateObject("ADODB.Recordset") 'commented out and made change below
	With x1
	.ActiveConnection = gObjConnect
	.CommandType = adCmdStoredProc
	.CommandText = "StoredProcName"
	.Parameters.Append  .CreateParameter("@Customer_ID", adInteger,adParamInput,,session("UserLocationId"))	
	set RS = .Execute 'Was RS = .Execute
	End With
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.