Solved

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

Posted on 2004-09-15
1
382 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:webusername
1 Comment
 
LVL 10

Accepted Solution

by:
123654789987 earned 500 total points
ID: 12062431
If dataset1.Tables.Count < 1 then

MessageBox.show("Empty")
EndIf
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now