Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty dates being sent as 12/30/1899
Message
From
17/05/2001 16:46:15
 
 
To
12/02/2001 19:41:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00469301
Message ID:
00508515
Views:
51
Hi Terry!!

I did what you say, but I get my date fields with a .NULL. word instead of blank dates.

I went to the ODBC driver and unchecked the null check box.
I set my source table up to accept nulls.
And I set default value to .NULL. for all date fields.


can you help me?

>>Hi!
>>
>>As I suggested. I did not known about other solutions for this ODBC/ADO/other stuff problem. VFP dates are of some sort unique data type. This, as you see, cause a lot of changes. Now, imagine the feeling of developers that move something to SQL Server... ARRGGGGHHH!!!
>>
>Well this weekend 20 in. of snow fell on my house and the power was off for two days. As a result I was able to do some reading on the subject. I think I found the problem and a solution. According to Visual FoxPro 6 Enterprise Development by Rod Paddock & John Pertsen et all the ODBC driver converts the data into a temp table internally. VFP dates transfer as DateTime data types. I was looking through the help files on TTOC and it said any value passed with out a date defaults to 12/30/1899 ( a ha!). So, and correct me if I am wrong the empty dates from my source table are transfered to DateTime and the 12/30/1899 is added. Then that data type is converted to Date when it is handed to me thus showing 12/30/1899.
>
>That all having been said I went into my table definitions and gave the ODBC something to chew on. I set my source table up to accept nulls and default to null for all date fields. I then went to the ODBC driver and unchecked the null check box and low and behold I got blank dates passed through to me. Glory be!!!
>
>My question to you is 1) Is my logic solid and 2) am I going to shoot myself in the foot down the road?
>
>Sorry for being dense reading your previous messages but I was unaware of the intermediate tables used by ODBC.
>
>Thanks Terry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform