ODBC error on a Select statement in ASP

ODBC error on a Select statement in ASP

Post by Joel Quise » Tue, 18 Nov 2003 06:18:15


Getting this message, but teh query does not have a date
in it

[Microsoft][ODBC Microsoft Access Driver] Syntax error in
date in query expression '(Game# = '1550')'.

Here is the query line in an ASP

QueryG = "Select * From Schedule where (Game# = '1550')"

Any ideas?
 
 
 

ODBC error on a Select statement in ASP

Post by John Vinso » Tue, 18 Nov 2003 09:33:17

On Sun, 16 Nov 2003 13:18:15 -0800, "Joel Quisenberry"



The # character is used as a delimiter for date fields. It should not
be used in fieldnames as a rule; if you do use it, you must enclose
the fieldname in square brackets. Assuming that Game# is a Text field
use

WHERE ([Game#] = '1550')

Leave off the ' marks if Game# is numeric.


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://www.yqcomputer.com/