Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Null date fields in an SQL Table
Message
De
22/08/2002 15:44:47
 
 
À
22/08/2002 10:46:17
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00692118
Message ID:
00692637
Vues:
20
This seems to happen due to the fact that ODBC and SQL Server has no concept of a blank date. Have you tried to replace blank dates in your view with NULL just prior to saving the record and then do a table update? Does it still change to 1/1/1900? If so, I can see no way to resolve this if you cannot keep nulls in your date fields when updating from your remote view.

I had this problem with an application that used remote views with different database backends. Blank dates in SQL Sever changed to 01/01/1900 and FOX databases changed to 12/30/1899 which made it almost impossible to resolve. I tried for about a week while in the design stage but never did resolve it. In that application, I changed all date fields to character fields storing dates a YYYYMMDD and created formatting functions that converted it to the set date format when displaying and reporting. This allowed me to sort in date order and compare dates and date ranges effectively, but was not a pretty workaround.

Good luck! :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform