MySQL via MyODBC: "You have an error in your SQL syntax" on a one-field table (Reported, not reproduced)

Applies to: as reported, a Clarion 5.x install (the reply names the "C5x bin folder") with MyODBC 3.51.06 and MySQL 4.0.16 or 4.1.1-alpha, later MySQL 3.23.58. Not reproduced on any later version.

Problem as reported

A first MySQL test: a table with one SHORT field, linked to the ODBC driver and the myodbc3 driver, and a simple browse plus update form. Running it showed "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 ......". The poster believed the generated statement was correct, since a one-field table leaves little room for a mistake.

What the thread found

  • One poster said he had heard of problems with the 4.x versions of MySQL and Clarion, and that he used 3.23.47 without problems. The poster installed mysql-3.23.58 and got the same result, so the server version was not the cause for him.
  • Two posters asked for the same next step: run the trace (in the Clarion bin folder), which shows the exact SQL sent to the database, and post that statement together with the SQL that creates the table.
  • The thread ends there. The poster did not post a trace and no cause was found.

Caveats

  • The error text is MySQL's, so the statement reaching the server is what to read; the thread never saw it.
  • Only the versions named above were tried.
  • Nothing in the thread says which statement failed (the open, the browse SELECT or the update).

Today (2026)

Not reproduced. This entry records a 2003 report. If you see this error on a current build, turn the trace on, read the statement MySQL objected to, and post it; a reader who can reproduce or close it is welcome.

Sources: Gasparetto (Dec 2003, the question), Robert J., Arnor B. (Dec 2003) in softvelocity.clarion.databasedrivers.