Found a pretty serious bug

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Found a pretty serious bug

Post by snorkel » Wed 25 Oct 2006 20:51

Given this table which uses a quoted reserved word:

CREATE TABLE `junk` (
`field1` int(11) default NULL,
`desc` varchar(16) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1

MyDAC cannot insert or update data using a a DBgrid (Quantum grid in my case) it seems to be that MyDAC is not handling the reserved words correctly.

If I manually do this in the query editor it works:
insert into junk (field1,`desc`) VALUES (23,'dfdfdfdf');


First chance exception at $7C81EB33. Exception class EMySqlException with message '
#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 'DESC = 'dfdfdfdgggf'
WHERE
field1 = 23 AND DESC = 'dfdfdfdf'' at line 3'. Process my_lightning_admin.exe (872)


Maybe I am missing a property setting or something, if I am please let me know.

Thanks,

Snorkel

snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Post by snorkel » Wed 25 Oct 2006 20:58

Never mind, not a bug, I just discovered there is a property in the dataset called qoutenames, set that to true and the problem went away.

Thanks,

Snorkel

Post Reply