how to detect if column in IDataReader has a NULL value?

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

..net 2.0

IDataReader reader;
if (reader["field1"] == null)
{
}

This if test don't come true. I've just tested it with a NULL value in
field1, and the code block within the if statement wasn't executed. Instead
it executed the else block (not shown here.)

any suggestions?
 
Back
Top