entering data in sql database through asp
pass=session("password")
Set objIns=server.CreateObject("adodb.connection")
objIns.Open session("Psrconnect")
inspass="Insert into passwords(pass) values ('&pass&')"
objIns.Execute(inspass)
i dont know what should be the syntax to pass the value stored in the variable. with this syntax, the value entered in the database is &pass&. can anyone plz开发者_运维问答 help me out?
I think this line
inspass="Insert into passwords(pass) values ('&pass&')"
should be
inspass="Insert into passwords(pass) values ('" & pass & "')"
Note the double quotes after and before each apostrophe.
精彩评论