Subject Re: [IBO] Null and numeric fields
Author Hans
Possible solution, add a 'before update and insert' trigger

if (new.dramount is null) new.dramount = 0;
if (new.cramount is null) new.cramount = 0;

----- Original Message -----
From: "jeffplata" <jeffplata@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, May 30, 2006 8:09 PM
Subject: [IBO] Null and numeric fields


> (Using FB 1.03, IBO 4.5B)
>
> In one of my tables I have two numeric(15,2) columns
>
> CREATE DOMAIN DM_MONEY AS
> NUMERIC(15,2)
> DEFAULT 0.00
>
> CREATE TABLE JEVENTRIES (
> ID INTEGER NOT NULL,
> JEVID INTEGER NOT NULL,
> GL VARCHAR(10),
> SL VARCHAR(10),
> ACTIVITYCODE VARCHAR(3),
> EXPENSETYPECODE VARCHAR(3),
> DRAMOUNT DM_MONEY,
> CRAMOUNT DM_MONEY
> )
>
> Clientside I set the following values for DefaultValues
> dramount=0.00
> cramount=0.00
>
> My problem is I still get null values with dramount and cramount
> sometimes, but not always. This problem occurs only when using the
> client program (using IBO). At one point I even set GetServerDefaults
> to true to no avail.
>
> Are there issues regading this behaviour? What should I do to ensure
> non-null values in the numeric fields?
>
> TIA
> Jeff
>
>
>
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>