Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assign DBNull.Value to datatime data column
Message
De
28/07/2008 21:01:59
 
 
À
24/07/2008 22:32:05
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MySQL
Divers
Thread ID:
01333634
Message ID:
01334755
Vues:
18
Do you need to set it to anything? Can you leave it at null? I don't know much about ASP.NET, so I'm not 100% sure what happens to the NewValue, but it seems from the docs that the ItemUpdating event simply passes the NewValue into the DataSource. Maybe it doesn't automatically know what to do with null though, so I'm not sure. I'm talking about leaving an e.NewValue["myfield"] == null alone and not setting it to DBNull.Value. Does this work?

Why is nobody else (other than Linda) helping out here? I know there are plenty of ASP.NET experts on this forum ... I just happen to NOT be one of them, but I feel bad when a question goes un-replied to for days ... =0(

~~Bonnie




>Thanks for reply.
>
>Actually Mysql date field did accept null value. But right now I only able to set the value to DateTime.MinValue. Got any others idea?
>
>TIA.
>
>Best Regards,
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform