Subject Re: [firebird-support] Re: NULL Date values
Author Paul Vinkenoog
Hi Jeff,

See also my previous reply. I wrongly assumed that DateToStr was the
Delphi function, but the rest still holds.

> SELECT DateToStr(INITIALCONTACTDT, '%m.%d.%y') FROM LEADS WHERE IDNO
> = '325'

Look at the declaration of the function DateToStr (I mean, the string
you use to declare it *to your database*). If the INITIALCONTACTDT
argument is passed by value, a NULL will always be passed as 0 to the
function, so the function can't know it was originally a NULL.

If, on the other hand, it is passed by reference (pointer or cstring)
or by descriptor, the function can tell NULLs from zeroes and should
be improved.


HTH,
Paul Vinkenoog