473,324 Members | 2,548 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,324 software developers and data experts.

numbers of rows


Hi,

I'm using a DataReader to connect to a db and retrieve data from the db.
I just wondering how can I know the numbers of rows contain in my DB for
the sql statement I used? For example, if the sql statement is like
this:

SELECT *
FROM DEPT;

I try objReader.(but I didn't find any reserved word related to
Rows.Count...
Can someone help me with this?

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
1 1155
Datareader is connected forward only "recordset". There's no way of knowing
how many records there are without going through all the records and
actually counting them.
You can use DataSet Tables if you need rows count: DataTable.Rows.Count.


"Claudia Fong" <cd********@yahoo.co.uk> wrote in message
news:up**************@TK2MSFTNGP15.phx.gbl...

Hi,

I'm using a DataReader to connect to a db and retrieve data from the db.
I just wondering how can I know the numbers of rows contain in my DB for
the sql statement I used? For example, if the sql statement is like
this:

SELECT *
FROM DEPT;

I try objReader.(but I didn't find any reserved word related to
Rows.Count...
Can someone help me with this?

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2

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

Similar topics

24
by: Frank Swarbrick | last post by:
We have a batch process that inserts large numbers (100,000 - 1,000,000) of records into a database each day. (DL/I database.) We're considering converting it to a DB2 table. Currently we have...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
2
by: alp3r | last post by:
Hi all, I have been developing windows form project. I have file like; "name", "Anderson1" "pass", "1514" "Scenario 1 - 1st Question - Ethical", "1-1eth | 1" "Scenario 1 - 1st Question -...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.