Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with DateTime and NULL columns in ADO.NET
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 1.1
Database:
MS SQL Server
Divers
Thread ID:
01015071
Message ID:
01015158
Vues:
20
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform