Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server 7.0 defaulting to 1/1/1900
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00278991
Message ID:
00279016
Vues:
16
>Hi William,
>
>>Using VFP 6.0 and a test database of 2000 records, I ran the Upsize wizard to push the data to SQL Server 7.0. All went well, but every date field that is empty (not NULL, just empty) in the VFP table defaulted to 1/1/1900 in the SQL table. Nulls was checked on for the SQL table, I chose NOT to upsize Indexes, Relations or Defaults. Any ideas?
>
>SQL Server, unlike VFP has no concept of an "empty" date, sad to say. The SQL Server default is 1/1/1900 as you observed. I changed my VFP validation rules to disallow empty dates and only allow NULLs in that case before Upsizing.
>
>HTH,

I just ran a test. Took one of the date fields and replaced all values with .NULL. when empty. Then when I ran the upsize I took another date field and changed it from the default DateTime type to smalldate type. Results were that the date column I set to .NULL. had a value on SQL Server. The column I switched the default to smalldate on defaulted to 1/1/1900 when the field was empty. As long as I know it the behavior, I can compensate for it like you did. It just seems you should be able to control the SQL default better. Thanks for the response.
Oct 31 = Dec 25
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform