Subject Re: [IBO] Currency is Null ---- How to stop
Author Lucas Franzen
Micahel,


> I have fields defined as
>
> CREATE DOMAIN T_CURRENCY AS NUMERIC(9,2) DEFAULT 0
>
> When these fields are displayed using TIB_Edit, if the user
> selects the data in the field and hits "Delete", then the
> value stored in the field of the DB is "NULL" instead of zero.

Of course it is.
If you don't enter a value it's NULL.

>
> Is there a way I can have IBO set the fields to zero? Or
> do I need to have a on update/insert trigger that checks
> every numeric field in the record to see if they are null
> and replace with a zero?

Either open the QueryEditor, prepare your query and enter "0" for that
field in the fields-property.

or

If you want ALL your fields that have the domain T_CURRENCY to be
defaulted to 0 then you have to do the following steps.

1. Set the property FieldEntryTypes-->fetDomain Names of your
IB_Connection to TRUE.
2. Open the DefaultValues of the IB_Connection and enter:
T_CURRENCY=0

That's it.


Have a nice christmas

Luc.