Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote Views and {12/31/1899}
Message
From
28/05/2002 11:36:09
 
 
To
28/05/2002 05:39:03
Jet Eloriaga
JetSpeed Solutions, Inc.
San Juan, Philippines
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00661891
Message ID:
00662036
Views:
17
Jet,
Remote views use ODBC connection to the database. ODBC has no concept of a blank date and 12/30/1899 (for VFP table, 1/1/1900 for SQL Server) is the default date that is stored when a blank date is updated via ODBC. You can either set the table up to accept nulls in date fields when a blank date is expected, or have code that interprets 12/30/1899 (and/or other defaults) as a blank date.

In my applications, when a date field is expected to possibly contain blank values, I store the dates in a character field in the format YYYYMMDD. This allows blank dates, allows querying for a range of dates and allows sorting by date order. It does however require conversion to a date format when outputing to reports and conversion from date to YYYYMMDD when querying or storing the date in the table. But it works with VFP, SQL and Oracle without having to deal with nulls or the different blank date defaults from each database.

HTH
Elmer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform