Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why empty date in VFP has entry in .NET?
Message
 
 
To
25/05/2004 13:37:49
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00907017
Message ID:
00907083
Views:
15
>>I retrieve a row from a VFP table, as datareader, where a date field has not entry (in VFP). But when I look at it in ASP.NET the date is there and it is 12/30/1899. I know I didn't enter any data in 1899 <g>. Who did?
>>
>>TIA.
>
>Dmitry,
>
>VFP's date type and .NET's datetime type are not exactly the same. You will have to manually convert 12/30/1899 to DbNull when you use the data.
>
>An alternative is to use a typed DataSet instead of a DataReader. You could edit the datetime column's Get accessor to return DbNull when the underlying data contains 12/30/1899.

Keith,

Thank you for your help. I will look up .net help on how to use DbNull (I don't know how to use it). Or I can check for the date to be greater than 1900 and consider everything before that date as empty. At this point, for this project, DataReader is my only choice.
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform