>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