Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty dates being sent as 12/30/1899
Message
From
13/02/2001 11:45:49
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00469301
Message ID:
00475317
Views:
53
Thanks Vlad! I truely appreciate the help.
>>>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?
>>
>
>Seems you're correct. I've never investigated this so deep. I just see from newsgroups and forums - nobody ever posted a solution to avoid this. Just workaround this using .NULL. values in fields.
>
>>Sorry for being dense reading your previous messages but I was unaware of the intermediate tables used by ODBC.
>>
>>Thanks Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Previous
Reply
Map
View

Click here to load this message in the networking platform