
Syntax error in FROM clause (ADO)
Quote:
> This is the strangest problem I have ever seen.
It's not that strange, nor that uncommon; there's a very simple (and
obvious if you think about it) explanation.
Quote:
> Thanks for taking the time to reply, but I was able to solve the problem by
> the changing the table name.
> so for example my table name was "Order", now when I have changed it to
> p_Order it works fine
> But if I change p_Order back to Order I have this problem.
"Order" is a reserved word in SQL (as in ORDER BY <field>). You can't use a
reserved word as an object (table, field, etc.) name, so you either have to
escape the name using brackets, e.g.:
SELECT <field>, <field> FROM [Order]
or, preferably, rename the field, as you have done.
hth
Adam