Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why empty date in VFP has entry in .NET?
Message
 
 
To
27/05/2004 13:29:18
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00907017
Message ID:
00907928
Views:
6
>>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.
>
>Even the CLR datetime type can not store null. What we do is consider DateTime.MinValue an empty date. If the date field is that we treat it like an empty... for example, in our aspx page we would do something like:
>
>this.eeTermDate.Text = (Employee.TermDate == DateTime.MinValue)?"":Employee.TermDate
>
>Then, when setting the parameter value for the sp, something like:
>
>parameter[5].Value = (Employee.TermDate == DateTime.MinValue) ? Convert.DBNull : Employee.TermDate
>
>BOb

BOb,
Thank you very much for the input. I will try using .MinValue too.
"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
Reply
Map
View

Click here to load this message in the networking platform