Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty dates being sent as 12/30/1899
Message
From
25/05/2001 11:56:12
 
 
To
17/05/2001 16:46:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00469301
Message ID:
00511586
Views:
52
>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

Alberto

I think you are saying that the date fields in your end result table are showing ".NULL.". If this is true then this is as it is normal. What you can do is issue a SET NULLDISPLAY TO "" to get the display of the .NULL. to show as blank.

Hope I understood your message correctly and this helps.

If not you can contact me faster at thobart@kfh.org or thobart@pacbell.net

Good luck

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