I have a problem checking for a NULL date. I have a public shared function which handles Strings.
contactName.Text = DBValueToString(dr("ContactName"), "Empty")
Public Shared Function DBValueToString(ByVal cellValue As Object, ByVal defaultValue As String) As String If cellValue.ToString Is DBNull.Value.ToString() Then Return defaultValue Else Return CType(cellValue, String) End If End Function This works great for strings, but not Dates. How would I check for dates that are NULL, without sending a default value?
Read Full article Here.
No comments:
Post a Comment
Post your comments here: