Checking for a null value in a dataset

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
 
M

Miha Markic [MVP C#]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top