tags:

views:

17

answers:

1
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?

A: 

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.

Barry
i am usingsession("password")=ywhere y has some value. is it the correct syntax. i am not sure if the session value is getting stored or not.
sushant
Have you tested it?
Barry
when i try your method. the entry goes emptythats why i was wondering if the value itself is getting stored in the session
sushant