Page 1 of 1

TBooleanField DefaultExpression problem

Posted: Wed 24 May 2006 14:21
by Zagawa
Hello,

I have the last version of MyDac with Delphi 5.

I have a SQL request like "Select * from client", and fields with a TbooleanField with a DefaultExpression set.

Result are displayed in a grid, MyDac components are requestlive so when i try to insert a new "Client" with this grid, i get an exception
>> 'EdatabaseError.. 'False' is not a valid boolean value for the field 'xx'.

Into DefaultExpression, i tried to set several things :
> 0,'0',False,'False',1,'1',true,'True' without success.

Is there a solution ?

Thanks.

Posted: Wed 24 May 2006 20:03
by teunis
The boolean support is lacking in MySQL
I changed all the booleans to TINYINT(1)

Posted: Thu 25 May 2006 09:10
by Antaeus
We have tested this issue, but no problem fas found. Please send us (evgeniyD*crlab*com) a complete small sample to demonstrate it, including script to create and fill table. Also supply us with version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor.

Posted: Fri 26 May 2006 12:38
by Antaeus
As we noticed from your example, your Delphi has french localization. Therefore you should use 'Vrai' and 'Faux' string values instead of 'True' and 'False'. These string values are stored in DbConsts.pas unit. Search for STextFalse and STextTrue constants.