Solved

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

Posted on 2004-09-15
1
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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