Verify datatable has records

cpopham

Well-known member
Joined
Feb 18, 2004
Messages
273
I am filling a datatable from a database and I have a couple of questions:

1) If the dataadpter returns zero records, will it still create a datatable in the dataset and just leave it empty?

2) If it does not create a table how could I verify that the datatable exists in an if statement?

3) How can I verify if a datatable contains at least one record in an if statement?

Chester
 
cpopham said:
I am filling a datatable from a database and I have a couple of questions:

1) If the dataadpter returns zero records, will it still create a datatable in the dataset and just leave it empty?

Yes

cpopham said:
2) If it does not create a table how could I verify that the datatable exists in an if statement?
Not an issue - it does create it.

cpopham said:
3) How can I verify if a datatable contains at least one record in an if statement?

Chester

If dt.Rows.Count > 0 Then
your code here
End If
 
Yeah, I figured it out. I am switching back and forth between vb .net programming and access vba programming and going to school full time so my mind does not always remember things the way that it should. Thanks for the help :)

Chester
 
Back
Top