Subject Re: [firebird-support] IBPP - Null Fields?
Author Olivier Mascia
On 28/05/2004 23:55 GMT+1, barfingdog_2004 wrote:

> Hi Experts:
>
> Yea, I know, this is best posted to the IBPP
> discussion group.
>
> My attempt to e-mial that group failed, with
> a complaint about an e-mail address. I don't
> know if my message got through. IBPP's archives
> have been updated today, but I don't see my post
> from over an hour ago. If my message has been
> received, I don't know if it will be another hour,
> another week, or another month, before I can see
> the post, and responses to it, in the archive.

Subscribe to the email list before posting.

> IBPP::Date date_val;
> st->Get("START_DATE", date_val);
> date_val.GetDate(year, month, day);
>
> This particular record has no start date
> specified. The Get() returns fine, the GetDate()
> throws an exception.

Of course.

> What do I put between the Get() and the
> GetDate() calls to test for a NULL entry in the
> field?

All Get() methods signal a SQL NULL by returning 'true'.
All Get() methods take special care *not* to touch the user variable, if
the column is NULL. Setting the Date variable to any value when reading
a NULL would be illogical and mostly incorrect.

--
Olivier Mascia