Subject Re: [IBO] Converting BDE to IBO
Author Helen Borrie
At 10:18 AM 4/11/2005 -0300, you wrote:
>2005/11/4, Helen Borrie <helebor@...>:
> > At 09:41 AM 4/11/2005 -0300, you wrote:
> > >Hi Helen,
> > >
> > >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.

Sorry for the typo, it should have been:

DBCheckBox1.ValueChecked := 'S';
DBCheckBox1.ValueUnchecked := 'N';

>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.

I think there might be something peculiar about your data. Perhaps you
should not define your domain with a COLLATION clause?

Would you try it with a test table using a differently defined Boolean
domain, with no specific charset or collation?

Where character sets are involved, I think it would be better to use
smallint for your Boolean columns and constrain them to be 1 and 0. This
way you will avoid the effects of variations in lower/upper case mappings
in the collations and also situations where users might enter lower case

could you defne a domain like:

create domain d_boolean2 as smallint
default 0
check (value is not null and value in (1,0));