MySQL Forums
Forum List  »  Connector/ODBC

[Error #1149] Syntax Error
Posted by: Mark Antony
Date: December 04, 2006 09:08AM

Please help as I am in dire need of a work-around for this issue for a project that is more than over-due.

I am currently a newbie w/Visual Studio using VB and have successfully connected to my SQL database using 3.51.14 ODBC to my remote MYSQL server. My MYSQL server version is: 4.0.27-standard.

I create a list box in which I enter the Query Builder (to populate the list box with data from the database) built into Visual Studio and type up a simple test query: Select * From `News`

Everything works fine. The News table has about 7 rows and everything populates into the Query Builder fine. I click `OK` and return to the sub-menu for inputting query's manually, then I click 'OK' to have my query posted as code, and then BAM I'm stopped with the message: MySQL [3.51.14] ERROR [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '. News'.

Why would everything work fine in the query builder, but in the manual query MYSQL doesn't like the syntax? I can connect to my SQL server through phpAdmin and run query's fine. I copy the test directly into the manual query builder and it still generates the same error. I've tried dummy tables with all lower case names, I've tried encapsulating in single quotes, fully qualified names, all caps, everything that I could find. Yet the error persists!

PLEASE HELP!

Options: ReplyQuote


Subject
Written By
Posted
[Error #1149] Syntax Error
December 04, 2006 09:08AM
December 06, 2006 08:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.