Subject Re: [IBO] Still little problems
Author Jason Wharton
If the column is going to be included in the INSERT statement then
server-side defaults will not be applied.
You will have to use a before insert trigger and catch the NULL coming in
and then assign the value you want as default at that time.

Another possibility is to set the PreparedInserts to false and this will
have IBO put together a custom insert request for each one posted. When in
this mode if a columns value is NULL I leave it out of the INSERT statement
which will then allow the server-side defaults to be applied.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Salvatore Besso" <s.besso@...>
To: "Lista IB Objects" <IBObjects@yahoogroups.com>
Sent: Sunday, March 16, 2003 5:06 AM
Subject: Re: [IBO] Still little problems


> hello Daniel,
>
> > You can set that field property(BlankIsNull)
> > in TIB_Query, via the query editor.
>
> This is the IB_Monitor response with BLANKISNULL *not checked* for
> field DESCRIPTION:
>
> /*---
> EXECUTE STATEMENT
> TR_HANDLE = 14498380
> STMT_HANDLE = 14499676
> PARAMS = [ Version 1 SQLd 5 SQLn 5
> [DESCRIPTION] = <n> ''
> [EXPIRY_DATE] = '16 mar 2003'
> [ALERT_DAYS_BEFORE] = 1
> [ALERT_DAYS_AFTER] = 1
> [EVENT_ENABLED] = 1 ]
>
> INSERT COUNT: 1
> ----*/
>
> And this is the IB_Monitor response with BLANKISNULL *checked* for
> field DESCRIPTION:
>
> /*---
> EXECUTE STATEMENT
> TR_HANDLE = 14505104
> STMT_HANDLE = 14499676
> PARAMS = [ Version 1 SQLd 5 SQLn 5
> [DESCRIPTION] = <n> ''
> [EXPIRY_DATE] = '16 mar 2003'
> [ALERT_DAYS_BEFORE] = 1
> [ALERT_DAYS_AFTER] = 1
> [EVENT_ENABLED] = 1 ]
>
> INSERT COUNT: 1
> ----*/
>
> As you can see there are no much differences... <g> And, NOT. There is
> no default value for field DESCRIPTION.
>
> Regards
> Salvatore