Subject Re: [firebird-support] Re: NULL Date values
Author Ann W. Harrison
jeff_j_dunlap wrote:
>
> At this point, my FB/SQL knowledge is very low. I want to have a
> better handle on what is going on with NULL dates before checking with
> the vendor. Also, the most recent rFunc version is dated 2003 and
> thanks to some docs Paul V. directed me to, I am beginning to think
> that the rFunc problems I am experiencing may be due to the way FB2
> handles NULL data. Although I've never tried FB 1 or 1.5, I think that
> rFunc works fine with those versions and needs to be updated to work
> with FB2, this being my humble opinion of course.
>

The NULL state of a field is not stored in the field itself, but in
a separate structure. If the field is NULL, the value stored in the
space allocated for the field is irrelevant and indeterminate. To
evaluate a field, one must first check the NULL state. If the field
is not NULL, then the value in the field buffer is valid.

As it happens, date field buffers are normally zeroed before values
are stored. Zero is the base date, 17 November 1858. That's what
you're seeing. And this behavior is old. Very old. Older than
Firebird - perhaps even older than some Firebird developers.


Regards,


Ann