Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted

1 solution

 
Share this answer
 
Comments
itskumarvikas 6-Jul-15 7:14am    
doesn't able to understand how and where?
deepankarbhatnagar 6-Jul-15 7:20am    
Use something like:

objRS.Open "SELECT field1, field2, field3, field4, field5, filed6, field7 FROM probphasetkts",objConn

see the ablove links .

We are here for help not for spoon feeding
itskumarvikas 6-Jul-15 7:23am    
i knew that. . i tried this before but that's not working, that's why i asked how? thanks for your valuable time and help. .!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900