Page 1 of 1

Error updating boolean field

Posted: Mon 17 Apr 2006 22:29
by mydac4std
I am using ver 4.30.0.11 for Delphi 2006.

I have a MySql table with a boolean field, and trying to update this field shows in debug mode the following

UPDATE anlag_aktiver
SET
Lock = :31
WHERE
ID = :Old_1

:31(Boolean,IN)=True
:Old_1(Integer,IN)=3

My Delphi code is just

Table.Edit;
Table.FieldByName('BooleanValue').AsBoolean := True;
Table.Post

I get err #42000 with information saying "...the right syntax to use near 'LOCK=b'1 where ID=3' at line 3"

Any solution?

Posted: Tue 18 Apr 2006 06:13
by Antaeus
You try using reserved word 'Lock' as field name. To avoid this problem you should set option QuoteNames to true.

Ok

Posted: Tue 18 Apr 2006 19:59
by Guest
Ok, you are right, thanks