Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with DateTime and NULL columns in ADO.NET
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 1.1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01015071
Message ID:
01015158
Views:
19
I am just reading the DateTime values from the database, rather than reading and writing, so I am lucky and will be able to avoid that.

>Hi, Chris,
>
>Awesome detective work! (bows down)
>
>One thing - this may or may not be relevant, but I figured I'd mention it. I tried that code with a datetimepicker control associated with the variable - since the dtpicker doesn't seem to be able to hold a null value, the value of the dtpicker becomes 1/1/1900. If the user doesn't change the date and you want to retain the NULL in the back-end, I believe you'll still need to put some code somewhere (either in a trigger, or in a stored proc, or whether it would be relevant) to convert the value of 1/1/1900 back to null.
>
>Thanks!
>Kevin
Chris McCandless
Red Sky Software
Previous
Reply
Map
View

Click here to load this message in the networking platform