Page 1 of 1

Found a pretty serious bug

Posted: Wed 25 Oct 2006 20:51
by snorkel
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

Posted: Wed 25 Oct 2006 20:58
by snorkel
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