Find out whether a dataset is empty or not in vb.net

i am working on datagrid with vb.net and mysql. i use odbcdatareader, dataset  to populate my datagrid. after doing the operations, my datagrid is sometimes empty . i got  an error message when i try to run the program. how can find out when a dataset is empty so that i print a mesage on the screen.thanks
webusernameAsked:
Who is Participating?
 
123654789987Connect With a Mentor Commented:
If dataset1.Tables.Count < 1 then

MessageBox.show("Empty")
EndIf
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.