Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date field from VFP to DateTime SQL Server
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01526924
Message ID:
01526925
Views:
70
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform