Subject Re: [IBO] Converting BDE to IBO
Author Andrei Luís
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.

If I cannot solve this, I will use a calculated field with some like
this at onCalcFields Event:

if iboTable1MyFakeBoolean.AsString='T' then
iboTable1MyBoolean.AsBoolean:=true
else
iboTable1MyBoolean.AsBoolean:=false;

This works fine, but: it is safe?

[]
Andrei



2005/11/4, Helen Borrie <helebor@...>:
> At 08:50 AM 4/11/2005 -0300, you wrote:
> >2005/11/4, Helen Borrie <helebor@...>:
> > > At 03:05 AM 4/11/2005 -0300, you wrote:
> > > >Hi Helen, thanks for your help.
> > > >
> > > >I already have a "boolean" domain like the examples you said. Sorry I
> > > >didn't mention that before. :-(
> > > >
> > > >Well, I follow the steps you gave me, and now when I add the
> > > >"booleans" fields in TIBOTable, they were created as TBooleanField.
> > > >That's fine.
> > > >
> > > >But, when I ran the application, the boolean fields are empty, it
> > > >doesn't show true or false either T or F. Only a blank field. This in
> > > >TDBGrid. If I point this field to a TDBCheckBox, it's always
> > > >unchecked.
> > > >
> > > >Do u know what could be happen?
> > >
> > > Unchecked means it's false. (Value is 'F'). I don't know how the VCL
> > > controls handle nulls, but if your domain is nullable then possibly the VCL
> > > controls treat null as false.
> >
> >My mistake: I forgot to mention that I already feed 1 "boolean field"
> >with "true" value and 1 with "false" value. Both are displaying
> >nothing, like if they both are "false".
> >
> >Any idea?
>
> No. Can you show your domain definition?
>
> Helen