#42000 : you have an error in your SQL syntax... near '?' at line x error with myDAC 4.30.11.15 (design time)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

#42000 : you have an error in your SQL syntax... near '?' at line x error with myDAC 4.30.11.15 (design time)

Post by swierzbicki » Wed 14 Jun 2006 16:08

Hi,

Here is a scenario to reproduce this bug :

Add a TmyQuery , name it master.
Fill the SQL property.
Add a Datasource and link it to the master query.
Left Click on the master Query , select field editor and retreive all fields (CTRL L)

Add a TmyQuery, name it Details
Fill the SQL property with a where clauses having 3 or 4 conditions
Add a Datasource and link it to the details query.
Left Click on the details Query , select field editor and retreive all fields (CTRL L)
Fill the MasterSource property
Fill the Master / Design key

That will works fine.

Now modify the SQL statement from the Details Query. Just remove the where clauses.
Try to activate the query : you will get an mysql error : #4200 you have an error in your SQL syntax... check you sql query near '?' at line xx

This error also happens when modifying an order by clause....

The solution to "bypass" this is to clear the Master/Detail key and then add the new persistent field...

Can anybody else test this ?
Thanks...

B.R.

Stephane Wierzbicki

Ps : BDS 2006 + Update 2 + Hotfixes 1 to 6

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 15 Jun 2006 13:21

Thank you for information. We have reproduced this problem. It will be fixed and included into the next MyDAC build.

Post Reply