Your query looks like this after variable substitution: SELECT * from tbluser WHERE User =Chris K
Chris K shold be in quotes. Try single quotes first then try double. If you use double use the ascii chr() function, Chr(39). Single: sqlstmt = "SELECT * from tbluser WHERE User ='" & strUser & "'" Double: sqlstmt = "SELECT * from tbluser WHERE User =" & chr(34) & strUser & chr(34) S- -----Original Message----- From: Jon Barnhardt [mailto:jon_barnhardt@;educ8.org] Sent: Tuesday, November 05, 2002 11:10 AM To: ActiveServerPages Subject: SQL query I'm doing a SIMPLE query against an access database and for some reason it doesn't like me. here is the statement: sqlstmt = "SELECT * from tbluser WHERE User =" & strUser Here is the error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'User =Chris K'. what gives?? I just can't see it today... Thanks again for the help Jon --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance. --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
