Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date field from VFP to DateTime SQL Server
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01526924
Message ID:
01526925
Vues:
69
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>I am copying records from VFP tables to SQL Server tables using the standard approach:
>
>
>     INSERT INTO MyTable
>      ( myfield1, myfield2) values (?MyTable.myfield1, ?MyTable.myfield2)
>
>
>Then this INSERT expression is passed to SQLEXEC(). A problem I have is when copying VFP Date field that has no entry (empty) to SQL Server DateTime field that is set to accept NULL the value in SQL server DateTime is 1900-01-01. I would prefer that the value would be set to NULL..
>
>Is there a way to do it, without "manually" checking each field (during the SCAN of records)? TIA.

The only way will be values (?evl(myTable.myField1,NULL), ?myTable.myField2)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform