hi,
hav put variables in my WHERE statements before
and not had a prob...however
1)get vars from page
2)next put some quotes round them
3)next the query and run it
then get error
4)statement looks like
can someone tell me where am i missing the quotes?
hav put variables in my WHERE statements before
and not had a prob...however
1)get vars from page
Code:
x_userlogin = request.Form("x_userlogin")
x_userpw = request.Form("x_userpw")
2)next put some quotes round them
Code:
x_userlogin = "" & x_userlogin & ""
x_userpw = "" & x_userpw & ""
3)next the query and run it
Code:
strsql2 = "SELECT * FROM tbl_users"
strsql2 = strsql2 & " WHERE userlogin = " & x_userlogin
strsql2 = strsql2 & " AND userpw = " & x_userpw
Set rs = conn.Execute(strsql2)
then get error
Code:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
Unknown column 'mjg' in 'where clause'
/dfasp2/stockviewmain.asp, line 33
4)statement looks like
Code:
SELECT * FROM tbl_users WHERE userlogin = mjg AND userpw = pw
can someone tell me where am i missing the quotes?