TBooleanField DefaultExpression problem

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Zagawa
Posts: 21
Joined: Fri 12 May 2006 09:56

TBooleanField DefaultExpression problem

Post by Zagawa » Wed 24 May 2006 14:21

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.

teunis
Posts: 48
Joined: Wed 01 Feb 2006 14:15
Location: Curacao

Post by teunis » Wed 24 May 2006 20:03

The boolean support is lacking in MySQL
I changed all the booleans to TINYINT(1)

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 25 May 2006 09:10

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 26 May 2006 12:38

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.

Post Reply