473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Checking for existence of DataTable.Rows

Hello-

I am attempting to determine if a DataTable has Rows, or
if it is empty. I am using this code:

If isDBNull(MyDataTable.Rows) Then
....

And it is returning false whether or not there are any
rows. Is there another way to check for this property?

Thanks, Adam
Nov 17 '05 #1
2 1947
rows. Is there another way to check for this property?

Yes....Just ask the usher_property to check the rows for you.
Nov 17 '05 #2
DataTable.Rows.Count

Here's more info:
http://msdn.microsoft.com/library/de...mberstopic.asp

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Developer for Hire
"Adam" <al****@comcast.net> wrote in message
news:1c****************************@phx.gbl...
Hello-

I am attempting to determine if a DataTable has Rows, or
if it is empty. I am using this code:

If isDBNull(MyDataTable.Rows) Then
...

And it is returning false whether or not there are any
rows. Is there another way to check for this property?

Thanks, Adam

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rcolby | last post by:
Hi all, I'm experiecing a problem with dates being returned from SQL 2000 Database. I retrieve the last updated field (Date) from a sql 2000 and then compare the returned date with another...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
3
by: Rich | last post by:
Hello, I am populating a datagridview from a datatable and filtering the number of rows with a dataview object. Is there a way to retrieve the rows displayed by the datagridview into a separate...
2
by: RSH | last post by:
Hi, Iam struggling with an application where I am trying to transfer a datarow from one sql server to another instance of sql server. The schmeas may be slightly different and I am getting an...
3
by: Martyn Fewtrell | last post by:
Hi there. I wonder if there was a "correct answer" for Vb.Net (I understand this is quite easy in C#). If im drawing data from a database using a TableAdapter the data ends up in a DataTable....
6
by: Pete Wittig | last post by:
Hi, I have a DataTable and I want to get a subset of the rows within it. I use the Select method to get my subset and the results are in a DataRow. I want to put those Rows back into a...
10
by: mcbobin | last post by:
Hi, Here's hoping someone can help... I'm using a stored procedure to return a single row of data ie a DataRow e.g. public static DataRow GetManualDailySplits(string prmLocationID, string
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
46
by: John | last post by:
Hi How can I check for existence of a certain table by name in and access database and if the table exists find the number of records in it? I guess I can access this information by setting up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.