开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜