Help! and please, in simple English. I am not a computer guru; neither am I a neophyte. However, my patience with computers is very limited and I am unfortunately, very dependent. I am working on my PhD dissertation, so time is at a premium.
Thanks to any and all who help and in step by step directions with terms I understand. Ta
rb
Since the error appears to come from an ASP page, I assume you're using VBScript to query an Access database. It would be very helpful to see the code lines that build the SQL string and then execute it or open a recordset on it. Here are some things to check, though:
- If the UserID value you are trying to concatenate into your SQL string as a criterion is a text value, make sure that you build quotes into the SQL string surrounding that value. For example, if you have code like this:
Dim strUserID
Dim strSQL
strUserID = "Fred"
strSQL = "SELECT * FROM MyTable WHERE UserID = " & strUserID
... then you should change that last line to something like this:
strSQL = "SELECT * FROM MyTable WHERE UserID = '" & strUserID & "'"
- Make sure that whatever variable you are concatenating into the SQL string actually has a non-Null, non-blank value. For debugging, add a line like
Response.Write strSQL
to see what the SQL string actually looks like. If you can't see what's wrong, post that here.