Dave Burke - Freelance .NET Developer specializing in Online Communities

A freelance .NET Developer

DBNull.Value and DateTime datatype, or, value types and reference types

This is a bit of a sticky wickett I'm seeing, trying to store a DBNull.Value in a BusObject DateTime member for passing to the DL.  As in:

useredit.birth_date = DataHelper.CheckNullString(txtBirthDate.Text); // CheckNullString returns DBNull.Value is txtBirthDate blank...

Seems to boil down to types.  Helpful newsgroup post from Madhu on this subject I'll have to get back to...

Posted: Mar 26 2004, 10:55 PM by daveburke | with 6 comment(s)
Filed under:

Comments

Scott McCulloch said:

You might want to take a look at dotnetnuke 2.0 and see how we handle business object nulls.. we use a NullHelper class that stores application defined nulls..
# March 26, 2004 11:58 PM

Dave Burke said:

Thanks, Scott. I will definitely try to do so!
# March 27, 2004 12:01 AM

AJ said:

We created a library of nullable datatypes. You can find something similar at http://nullabletypes.sourceforge.net/
# March 27, 2004 3:00 PM

Dave Burke said:

AJ, I gave nullabletypes a look and may being moving in that direction depending on the outcome of my current approach. Thanks so much!
# March 27, 2004 5:57 PM

TrackBack said:

# March 30, 2004 10:22 PM

Dharmendra gour said:

plz give me more information about the
DBnull
and Gettype()

thanks
Dharmendra
# July 31, 2004 4:52 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)