Solved

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

Posted on 2004-09-15
1
384 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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