Is there any difference between null and System.DBNull.Value? If yes, what is it?
I noticed this behavior now -
while (rdr.Read()) { if (rdr[\"I
DataRow has a method that is called IsNull() that you can use to test the column if it has a null value - regarding to the null as it's seen by the database.
IsNull()
DataRow["col"]==null will allways be false.
DataRow["col"]==null
false
use
DataRow r; if (r.IsNull("col")) ...
instead.