Hey,
Here is my code...
...and here is the error that I get...
...now, most of the pages I find end up being the obvious issue of someone not using/specifying the client side cursor, but I've done that, and its still not working.
Any ideas?
Tj
Here is my code...
Code:
Dim iRetVal, iUID
Dim conn, cmd, rs
Set conn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.RecordSet")
iUID = Session("UserID")
With cmd
.CommandText = "usp_myProgs"
.Name = "mp"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("retval", adInteger, adParamReturnValue) '0
.Parameters.Append .CreateParameter("uid", adInteger, adParamInput, , iUID) '1 '3
End With
With rs
.CursorLocation = adUseClient
.CursorType = adOpenForwardOnly
.LockType = adLockBatchOptimistic 'adLockReadOnly
End With
conn.Open C_DBCONNECTION
Set cmd.ActiveConnection = conn
Set rs = cmd.Execute
Set rs.ActiveConnection = Nothing
conn.Close
iRetVal = cmd(0).Value
If iRetVal <> -1 Then 'records were returned
Do Until rs.EOF
'output table rows
Loop
Else
'output 1 empty row
End if
Set cmd = nothing
Set rs = nothing
End Function
...and here is the error that I get...
Code:
Error Type:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.
{pagename}.asp, line 38
...now, most of the pages I find end up being the obvious issue of someone not using/specifying the client side cursor, but I've done that, and its still not working.
Any ideas?
Tj