Subject Re: FB & VFP6 How to store empty date
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, Namit Nathwani wrote:
> Hi all
>
> I am using FireBird as a backend for VFP6, via remote views. I have
> a couple of date fields in the table. When I try to save a record
> in the view I get the following error:
>
> Connectivity error: Dynamic SQL Error
> SQL error code = -303
> conversion error from string '"'
>
> This error goes away when I fill in the date fields. Anyway that FB
> will accept blank dates (not NULL please I have had a tough time
> with it in VFP).

A blank date that isn't unknown (NULL)??? I cannot remember to ever
have lived through that day, nor do I know anyone else that was alive
that day... Well, maybe Martijn when he ran out of Bamsemums and had
one day to complete one weeks' work on Database Workbench. ;~}

I suppose you could have two fields, one string and one date. The
users see the string field, whereas the date field is populated
through a trigger if the string is not empty (then the update will
fail if the string field is not a proper date). Though this may give
you surprises when it comes to searching and I wouldn't be surprised
if it gave you more trouble than handling NULL in a proper way.

The problem is that a date is stored as a number of days since a
certain date, and an empty string is a lousy number.

Set