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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
123654789987Connect With a Mentor Commented:
If dataset1.Tables.Count < 1 then

MessageBox.show("Empty")
EndIf
0
All Courses

From novice to tech pro — start learning today.