asp_databases thread: Re: Error:Operation is not allowed when the object is closed
Just one thing, do you not need to Execute the command before opening the
After specifying the .ActiveConnection property try putting
cmdResult.Execute. Not guaranteed to work, because i don't know what the
rest of the code is, but it might.
I have a command object and the command type is a stored procedure. The
stored procedure is a select statement. I want to view 5 result per page
This is some of my code:
Set cmdResult = Server.CreateObject("ADODB.Command")
cmdResult.CommandType = adCmdStoredProc
cmdResult.CommandText = "sp_Practitioner13"
cmdResult.ActiveConnection = cnToronto
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3
rs.CursorType = 3
rs.Open = cmdResult
if rs.EOF then <- The error occurs at this line
I have this error message:
Operation is not allowed when the object is closed.
Any help would be very appreciated!