473,395 Members | 1,442 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,395 software developers and data experts.

Get RecordCount or HasRows from SQLDataAdapter?

Hi, all! What is the method for either testing for rows in a
recordset or returning the number of rows in a recordset from a
populated Adapter or from a DataSet? I know you can use HasRows with
a Reader, but I can't use a Reader in this particular instance...

Thanks!
Jack
Nov 21 '05 #1
2 9946
Hi,

Dataset.tables(0).rows.count

Ken
-------------
"Jack Black" <ja********@hotmail.com> wrote in message
news:vm********************************@4ax.com...
Hi, all! What is the method for either testing for rows in a
recordset or returning the number of rows in a recordset from a
populated Adapter or from a DataSet? I know you can use HasRows with
a Reader, but I can't use a Reader in this particular instance...

Thanks!
Jack

Nov 21 '05 #2
Ken, thanks for the reply!

I came across a reference to <DataGrid>.Items.Count before you
replied, so I gave that a whirl and it worked (the dataset is
populating a DataGrid in this chunk of code). I'd imagine it's best
to eliminate that extra grid-population overhead... Yes, No?

Jack

On Wed, 22 Sep 2004 16:56:41 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote:
Hi,

Dataset.tables(0).rows.count

Ken
-------------
"Jack Black" <ja********@hotmail.com> wrote in message
news:vm********************************@4ax.com.. .
Hi, all! What is the method for either testing for rows in a
recordset or returning the number of rows in a recordset from a
populated Adapter or from a DataSet? I know you can use HasRows with
a Reader, but I can't use a Reader in this particular instance...

Thanks!
Jack


Nov 21 '05 #3

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

Similar topics

0
by: James Hokes | last post by:
Hi All, We're using the 1.1. Framework against SQL Server 2000, and are having a strange issue where we don't get errors back from the stored procedure, i.e. the exception never gets thrown. ...
12
by: scott | last post by:
In LISTING 2, I have a SPROC that returns a recordset and a recordcount in SQL QA. I can access the Recordset with no problem. How can I grab the Recordcount with ASP code at the same time I'm...
1
by: charliewest | last post by:
Is there a .Net Compact Framework equivalent in the system.data.sqlserverce namespace of the .Net Framework system.data.sqlclient DataReader object's "Has.Rows" method? For example: ...
2
by: gjtired | last post by:
Hi, I can't figure out why my HasRows code is always true. Below is a snippet of my code. sqlConnection1.Open(); //Check that quiz name is not a duplicate during the Create(0)task string...
1
by: Claudia Fong | last post by:
Hi, I'm using the oleDbDataReader HasRows properties to detect wheter my table contains a record with the parameter below: oleDbConnection1.Close(); objreturnst.Parameters.Value =...
2
by: Stijn Verrept | last post by:
I am having the same problem as the person in this thread mentions: http://groups.google.be/groups?q=asp+net+empty+datareader+hasrows&hl=nl&...
9
by: Paul | last post by:
Does anyone have any insight on how I can get a count of the records returned after executing an ExecuteReader command? Something similar to the ..RecordCount property in Classic ASP?
1
by: Goen | last post by:
iam usualy use this statement in vb6 Rs.Open "Select * from myTable",Con,1,3 If Rs.Recordcount =0 then msgbox "Table Empty" else msgbox "Total record are : " & Rs.Recordcount endif Does...
1
by: Rick | last post by:
I have found the HasRows member of the OleDbConnection. This is very nice to tell me if I have any data coming but what if I want to see how many rows of data I have. Is there a similar member to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.