Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date field from VFP to DateTime SQL Server
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Date field from VFP to DateTime SQL Server
Miscellaneous
Thread ID:
01526924
Message ID:
01526924
Views:
94
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 creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform