ADODB.Command error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/imsnew/processlogon.asp, line 21
line 21 is in bold
set cmd=SERVER.CreateObject("ADODB.Command")
cmd.CommandType = 1
cmd.Parameters.Append cmd.CreateParameter("userId", 200, 1,100,request("userId"))
cmd.Parameters.Append cmd.CreateParameter("pwd", 200, 1,100,request("pwd"))
dim sqlquery
'response.write Request.Form.Item("PASSWORD") & Request.Form("USERID") & session("branchManagerId")
sqlquery = "SELECT *, DateDiff(dd,IsNull(LastPasswordUpdateDate,GetDate()-61),GetDate()) As LastPasswordUpdateDateDay FROM client.AGENT WHERE (BatchNo=?) AND ((Convert(varchar(max),DecryptByPassPhrase('password', dbo.HexStrToVarBin([Password]))) ='"&password &"' or password='"&password &"')) and branchId= " & session("branchManagerId") & " order by agent_Id "
cmd.commandtext =sqlquery
'response.Write sqlquery
set RSS = cmd.Execute
cmd.ActiveConnection=strdsn
password = Request.Form("PASSWORD")
SET myRS = SERVER.CreateObject ("ADODB.RECORDSET")
'Date:10/31/2012
if session("branchManagerId")="" then
Response.Redirect("agent_login.asp")
end if