Operation is not allowed when the object is closed.
Can some one please let me know why I am receiving this error
Here is asp code:
Dim ObjRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set ObjRS = Server.CreateObject("ADODB.Recordset")
Set Objcmd = Server.CreateObject("ADODB.Command")
objConn.Open "Provider=SQLOLEDB;User ID=eLearning; password=admin00;Data Source=QTOMASQL7SQL1.ad.qintra.com,7115;Initial Catalog=NTDElearning"
Set Objcmd.ActiveConnection = objConn
Objcmd.CommandText = "GAME_Sp_LeaderBoard"
Objcmd.CommandType = adCmdStoredProc
Objcmd.Parameters.Append Objcmd.CreateParameter("@userCuid", adVarchar, adParamInput, 10, "rkgauta")
Objcmd.Parameters.Append Objcmd.CreateParameter("@gameId", adInteger, adParamInput, 4, 4)
set ObjRS = Objcmd.Execute
IF ObjRS.EOF THEN
Response.Write "Sorry, no records were found for that searchterm"
else
response.Write(objRs.fields("UserId"))
end if
When I run this it throws :
(Operation is not allowed when the object is closed.)
My sp runs fine when I execute in SSMS ,It returns rows.
There is somthing wrong ,not sure .Please help on this
|