Subject RE: [IBO] Boolean with NULL
Author Zile
Helen,

I am reading column rdb$null_flag from rdb$relation_fields table, and I
can't change anything there . So if it is not logical (I agree with you it
is not), why is it implemented like that in system tables ?

Regards

Zoran

-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Sunday, August 12, 2001 15.52
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Boolean with NULL



This is not a logical implementation of a Boolean pair. NULL does not mean
zero, it means "unknown"; and it is not a value but a STATE. You need to
set two distinct values, e.g. 1 and 0.

In the database, create a domain similar to this for use on all Booleans.
Then you can make this global to your IBO application in the
ColumnAttributes property of the Connection object. You will need to
include fetDomainName in the connection's FieldEntryTypes set, too.

CREATE DOMAIN D_BOOLEAN AS SMALLINT
NOT NULL /* for a true 2-phase Boolean */
CHECK(VALUE IN(1,0));

Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/