Reputation: 61
I have a session definition on login page named Session("user") and I want to use this session in my sql such as
Set insertrec=db.Execute("insert into prgcontrol (vercheck) values ('"&=Session("user")&"' )" )
But I could not do anything with this code.
Can anyone help me?
Upvotes: 0
Views: 67
Reputation: 7612
Firstly, this is very bad way of talking to database. Never use string concatenation. Learn about parameterized queries. See sample here.
But anyway, from your code it looks like you have an extra =
character before Session
Set insertrec=db.Execute("insert into prgcontrol (vercheck) values ('" & Session("user") & "')" )
Upvotes: 2