Subject Re: IB_SQL with default values & triggers
Author Marco Menardi <mmenaz@lycosmail.com>
You have to remember that default values applies, on the server side,
to fields that are NOT SET, i.e. that are missing in the update/insert
SQL string that the client sends to the server. The "null" value is a
value, so no default is applied.
You can:
a) use "getserverdefaults", so default values are retrieved from the
server and, if not changed by the user, sent back to the server (and
in the connection component, if you use domains very much,
FieldEntryType to [fetDomainName], see the help file)
b) use triggers in insert event that set null fields to the default
value you want (also set "blank is null" property)
c) write a custom insert sql code to make ibo avoid use certain fields
for insert, but of course you will not be able to insert different
values into those fields
regards
Marco Menardi

--- In IBObjects@yahoogroups.com, "sdbeames <s.beames@m...>"
<s.beames@m...> wrote:
> When using IB_SQL I notice that inserting a row does not seem to
> result in server default values being applied to empty fields and my
> BeforeInsert triggers are ineffective. I committed & refreshed but
> the fields are still empty. Does IB_SQL insert something other than
> null (space?) into a blank field?
>
> Thanks,
> Steve