R
Raymond Du
Hi,
I used a SqlDataReader to get data from SQL server, say the variable name is
drEmployee.
I tried to determine if HireDate column in drEmployee is null by using C#
code:
if (drEmployee["HireDate"] != null)
Doesn't work at all, I also setup breakpoint, added drEmployee["HireDate"]
to QuickWatch window, it showed:
{System.DBNull}
(drEmployee["HireDate"] != null) just simply returns true.
Any Idea?
Thanks in Advance
I used a SqlDataReader to get data from SQL server, say the variable name is
drEmployee.
I tried to determine if HireDate column in drEmployee is null by using C#
code:
if (drEmployee["HireDate"] != null)
Doesn't work at all, I also setup breakpoint, added drEmployee["HireDate"]
to QuickWatch window, it showed:
{System.DBNull}
(drEmployee["HireDate"] != null) just simply returns true.
Any Idea?
Thanks in Advance