I had similar problem having table InnoDB with only one Field of FLOAT type and with no constraints:
Code: Select all
CREATE TABLE `qn` (
`nazwa` float NOT NULL,
PRIMARY KEY (`nazwa`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1250;
With some default values:
Code: Select all
INSERT INTO qn VALUES (1), (1.5), (2);
Then when I tried to delete any of records from MySQL Query Browser it was no problem.
But when I tried to do it from Delphi by TMyTable and it's Data Editor I got
ERROR #42000 "....". The same when I was running the program, deleting records using DBNavigator was giving the same error. Adding or editing records was no problem.
So I bypassed the problem adding an extra ID field (INTEGER) not null, auto increment.
Hope this will help our DAC programmers.
I suspect that (re-)indexing with float field can lead to that problem.
Windows XP SP2, Turbo Delphi, MySQL 5.0.45, MyDAC 5.10.0.10.
Michal
Well

as a matter of fact I found that my fix allowed me to delete records form under TMyTable -> Data Editor (design-time), but the problem still existed in runtime!
The whole Message was:
Code: Select all
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2.
After investigating I found that i had to add the new ID field to TMyTable fields editor (silly mistake), where the previous one only was.