Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views and {12/31/1899}
Message
De
28/05/2002 11:36:09
 
 
À
28/05/2002 05:39:03
Jet Eloriaga
JetSpeed Solutions, Inc.
San Juan, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00661891
Message ID:
00662036
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform