Check to see if dataset row is null

liunx

Guest
How can I check to see if a dataset row is null?

Thanks in advance!!Example:

VB.NET
If DataSet.Tables(0).Rows(0).Item("FieldName") Is DBNull.Value Then

C#
if (DataSet.Tables(0).Rows(0).Item["FieldName"] == DBNull.Value);Or this slightly shorter version of the same.

If IsDbNull(DataSet.Tables(0).Rows(0).Item("FieldName")) Thenhey thanks alot guys!!
 
Back
Top