Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assign DBNull.Value to datatime data column
Message
From
28/07/2008 21:01:59
 
 
To
24/07/2008 22:32:05
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01333634
Message ID:
01334755
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform