Help! Syntax error in FROM clause

  • Thread starter Thread starter PSI
  • Start date Start date
P

PSI

the foloowing query:

SELECT ShellmodSelect.* FROM ShellmodSelect WHERE
ShellmodSelect.AssessID = 1

is giving me:

Syntax Error in From clause

when run from my C++ app.

Some notes:
1) If I paste the query into Access it works no problem.
2) If I change the tablename to something else it still doesn't work
3) I've tried brackets around all the fields, putting expliucit names
instead of * - all to no avail.

The table is set as follows:

ID - autonumber PK
AssessID - number, FK
SelectID - number
Foot - number

I googled "Syntax error in From clause" and checked some of the
things that have mislead others but still no go.

Anyone have some suggestions? Please!

I'm using VC++ 6.0, ADO, Jet 4.0, MDAC 2.7, Win2k pro.

Thanks
Frank
 
Problem solved :-)

It had nothing to do with the query itself but was due to passing ADO
a CString rather than a BSTR.

My apologies for wasting everyones time.
Cheers
Frank
 
I am having the same exact problem, except I am using VB.NET rather than C++.

Could you please tell me exactly how you resolved this problem? I am not very familiar with CString vs BSTR.

Thanks.
 
Back
Top