TCheckBox in Builder 6

TCheckBox in Builder 6

Postby drdwilcox » Tue 03 May 2005 15:56

I am attempting to use a TCHeckBox with a MySQL 4.0.20 database at my ISP. I am using TINYINT for all of my boolean fields, because there is no true boolean column type. With this, all of my TCheckBox components are in the indeterminate state. I have tries changing the values to -1 and 1, but neither results in them being checked.

What is the correct column type for booleans from your perspective, and when what is the correct value for true.

On a related note, when I tried checking one of the boxes and posting the record, I received an error from MySQL that 'TRUE' is not a valid values (since the constant was introduced in 4.1).

Thanks,

Don
drdwilcox
 
Posts: 4
Joined: Fri 22 Apr 2005 15:51
Location: Glendale, AZ

Postby Ikar » Wed 04 May 2005 10:56

At first check that you use MyDAC newer than 3.10.1.7
Then declare this field at the server as TinyInt(1). As a result, this field will be represented on client side as TBooleanField.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby drdwilcox » Wed 04 May 2005 18:28

Thanks, that did it
drdwilcox
 
Posts: 4
Joined: Fri 22 Apr 2005 15:51
Location: Glendale, AZ


Return to MySQL Data Access Components