Subject | Re: [IBO] Boolean with NULL |
---|---|
Author | Helen Borrie |
Post date | 2001-08-12T13:52:10Z |
At 02:39 PM 12-08-01 +0200, you wrote:
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
_______________________________________________________
> I have a query which returns one column with possible values 1 or NULL. IThis 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.
>am using TIB_Grid to show data, and I want to show this column as Boolean
>(checkbox in that column of grid). I set up properties in editor: Boolean
>checked, True text=1, but what should I set as False Text? In rows where
>NULL is returned there is checked check box, but disabled.
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
_______________________________________________________