Checking for a null value in a dataset

  • Thread starter Thread starter Lee Trotter
  • Start date Start date
L

Lee Trotter

I have a one record dataset with a number of fields. Some of the fields
have null values. When I try to use these field VB.Net thoughs an error
about them being null.

If DataRow.IsNull(objDS.Tables(0).Rows(0).Item(0)) Then
Gives me the error:

Reference to non-shared member 'Public Function IsNull ( ByVal columnName As
String ) As Boolean' requires an object reference.



Any ideas?

Thanks
 
You should use DataRow instance:
objDS.Tables(0).Rows(0).IsNull(overloaded)
 
Back
Top