Subject Re: IB 6.1 Whish: boolean field
Author julien_ferraro
--- In IB-Architect@y..., Helen Borrie <helebor@w...> wrote:
> At 03:57 PM 03-08-00 +0200, you wrote:
> > >> I wonder how the community feels abou implementing a boolean
field type
> >into
> > >> interbase ?
> > >>
> > >> At this moment I use a domain, but i would like a real boolean
type
> >better.
> > >
> > >What's wrong with the domain?
> > >
> > >create domain boolean as smallint default 0 not null check(value
in
> > >(0,1))
> > >
> > >or
> > >
> > >create domain boolean as char(1) default 'F' not null check
(value in
> > >('F','T'))
> >
> >
> >I know, but on the delphi side you cannot use a TBooleanField, but
get a
> >TSmallIntergerField, and thats needs some coding to work. (You
cannot use a
> >TDBCheckbox for example)
> >
> >Also, I find some strange behaviour in the default, I have to duck
in it
> >deeper te remember what it was.
> >
> >John
>
> It sounds as if you need IBObjects. You can set all domain
defaults at
> connection level AND tell the application the true and false values
for
> Booleans - then your delphi app will treat every occurrence of that
domain
> as Boolean for evaluations AND display them in checkboxes when you
use 'em
> in grids. And automatically fetch generator values. etc.
etc. "right
> tool for the job".
>
> Boolean isn't a standard SQL92 type (tho' it was introduced in
SQL3).
>
> Helen



Of course we can use IBObjects. But tell me if I'm wrong : You cannot
use it with anything else than InterBase, even if I don't see any
good reason why using another database :)

And it should be nice to use AsBoolean with the BDE ... It's better
than AsInteger = 1

Julien


PS : this answer comes nearly 2 years after the original message.
It's because I plan to switch to InterBase from @#$%^&* (that's why I
would like to have 2 differents databases) and found this as a real
problem. SO I went to the list archives. But maybe I missed something
that happened later...