-
asp and sql
my sql statement... select * from tbl_m_user-one
and i'm having this two problems...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
can u guys tell me what is going on?
thanks....
-
Have you double checked if if the tables name was spelt correctly?
-
yeah.... i double checked it... can the hyphen be the problem.... btw the database is in access....
-
Could you post the code? That helps greatly.
-
Take out the hyphen. I can't say for sure that it is causing the problem, but it is the one thing that logic says doesn't belong in a table or column name, much like reserved words.
-
Didn't read the the post right, lol.
As kode said, and that should hopefully fix it.
-
but, when i put square bracket around the tablename, i seen some examples doing that....
select * from [tbl_m_user-one].... it work
-
Opps, I knew that, should have suggested that, sorry :)
-
Yes, that would fix it, as square brackets are used to encase a string with "bad" characters, just like in ASP, you can have variables with spaces in them, using square brackets. If you took out the hyphen, you wouldn't need the square brackets.