Subject Re: [firebird-support] boolean fields
Author Peter Sanders
Hi Rob

On Tue, 9 Nov 2004 15:53:28 +1300, Robert martin <rob@...> wrote:

> We have converted our Booleans to T or F char fields. This works great
> with
> all the standard Delphi components we use, even our .AsBoolean code works
> perfectly. You should be able to do your 'if Data.Field then' code, I am
> not sure because we prefer explicitly doing the comparison 'if
> DataField.AsBoolean = True then'.

Thanks for the info. I will wander off now and try that with my db and see
if it works for me. BTW I did try a DOMAIN definition with a 0-1 check
contstraint and it did work, however I think your implementation is better.

>> With the eventual release of FB2, will it be possible for it to support
>> boolean fields "directly" i.e. not a numeric value per se, or is this
>> specifically an SQL issue?
>>
>> When I use check boxes in my app it is easier and more "logical" to code
>> "if data.field then..." than if Data.field = 1 or similar. It would also
>> allow the use of more of the Delphi/third party components that
>> recognise
>> such boolean fields. They do not recognise the numeric field.

--
Kind regards

Peter Sanders