Subject | Re: [ib-support] Re: Solved. Backup - Decompression overrun buffer (179) |
---|---|
Author | Helen Borrie |
Post date | 2001-05-17T00:14:09Z |
At 08:16 PM 16-05-01 +0000, you wrote:
NULL is always NULL - "no value".
If you enter zero in an InterBase date type , you will see 17-NOV-1858 00:00:00, which is date zero in IB.
The date 31-DEC-1899 is date zero in Delphi, perhaps even in Windows. Delphi doesn't admit the possiblity of nulls and replaces them with zero (or empty string in the case of character fields).
In any case, IB does not recognise either of these dates as NULL. If you want to post a NULL from a Delphi app, you have to either
(a) exclude the column in question from your DML statement
or
(b) call the Clear method on the column's ParamByName property.
If you have a trigger or constraint (e.g. a DEFAULT) that acts on a NULL, then your statement must pass NULL to make it work.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
> Normally, due to app logic, reference constraints and before insertI'd be interested to see the constraints you have defined to prevent zero entries.
>trigger on this table, it can't contain any 0's and nulls.
> Curious is null represented by 17-NOV-1858 00:00:00 in one of dateNo, you have some incorrect assumptions here.
>columns and <null> in others... And I always thought null is
>31-DEC-1899, but restore recognized it as null.
NULL is always NULL - "no value".
If you enter zero in an InterBase date type , you will see 17-NOV-1858 00:00:00, which is date zero in IB.
The date 31-DEC-1899 is date zero in Delphi, perhaps even in Windows. Delphi doesn't admit the possiblity of nulls and replaces them with zero (or empty string in the case of character fields).
In any case, IB does not recognise either of these dates as NULL. If you want to post a NULL from a Delphi app, you have to either
(a) exclude the column in question from your DML statement
or
(b) call the Clear method on the column's ParamByName property.
If you have a trigger or constraint (e.g. a DEFAULT) that acts on a NULL, then your statement must pass NULL to make it work.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________