Currently, whenever I pass a string to the db, if that string is empty, then i set that object to NULL by doing the following:
IIf(DescriptionTxt.Text.length > 0, DescriptionTxt.Text, DBNull.Value)
I was thinking about writing a function to reduce the length of this code, and make it more consistent.
However, I was wondering, is there already a way of doing this in .NET 3.5?