开发者

entering data in sql database through asp

开发者 https://www.devze.com 2023-01-03 03:58 出处:网络
pass=session(\"password\") Set objIns=server.CreateObject(\"adodb.connection\") objIns.Open session(\"Psrconnect\")
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消