Subject | Re: [IBO] Converting BDE to IBO |
---|---|
Author | Andrei Luís |
Post date | 2005-11-04T18:05:47Z |
Hi to all,
Finally I get sucess with TDBCheckBox, changing ValueChecked to 'T'
and ValueUnchecked to 'F'.
But, I have in this application, several times, boolean comparison,
like if tbCustomerActive then .... This is still not solved. How can
I simulate those char fields as boolean?
[]
Andrei
2005/11/4, Daniel Rail <daniel@...>:
Finally I get sucess with TDBCheckBox, changing ValueChecked to 'T'
and ValueUnchecked to 'F'.
But, I have in this application, several times, boolean comparison,
like if tbCustomerActive then .... This is still not solved. How can
I simulate those char fields as boolean?
[]
Andrei
2005/11/4, Daniel Rail <daniel@...>:
> Hi,
>
> At November 4, 2005, 9:18 AM, Andrei Luís wrote:
>
> > 2005/11/4, Helen Borrie <helebor@...>:
> >> At 09:41 AM 4/11/2005 -0300, you wrote:
> >> >Hi Helen,
> >> >
> >> >CREATE DOMAIN BOOLEAN AS
> >> >CHAR(1) CHARACTER SET WIN1252
> >> >DEFAULT 'N'
> >> >CHECK (value in ('N', 'S'))
> >> >COLLATE WIN1252
> >> >
> >> >I do the tests with two fields. One using the domain above, and other
> >> >field without domain. The result was the same: both 'N' (false) and
> >> >'S' (true) are handle as false!!! Tried with 'T' and 'F', and didn't
> >> >works too.
> >> >
> >> >I don't know what is happen.
> >>
> >> Do you have these properties set in your DBCheckBox?
> >>
> >> DBCheckBox1.ValueChecked := 'S';
> >> DBCheckBox1.ValueChecked := 'N';
> >>
> >> I don't think TDBCheckBox is specifically for Boolean pairs like
> >> TIB_CheckBox is...
>
> > Just changed that properties and still didn't work. I used a lot of
> > TDBCheckbox with Paradox, and it always works fine with boolean
> > fields. As I concern it is specially made for this.
>
> With TDBCheckBox, there are two properties that you can set in
> design-time or in run-time(as Helen already pointed out). Those
> properties are ValueChecked and ValueUnchecked. By default, they are
> set to True and False, but they can be changed to whatever value you
> need. As an example, I assign them as follows ValueChecked:='T' and
> ValueUnchecked:='F'. You can use whatever value you need for those
> properties. And, I did the same exercise 5 years ago when I migrated
> a Paradox application to Firebird using Delphi 5 and IBO.
>
> --
> Best regards,
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)