RecordCount of a datareader

S

Steve Caliendo

Hi,

I can't seem to figure out how to determine the number of records are
returned when using a DataReader. I use:

While Rs1.Read
some stuff
end while

But what I'd really like to know is Rs1.RecordCount which doesn't exist. Or
does it in some other syntax?

Steve
 
J

John Oakes

The DataReader is readonly forward-only. It doesn't know the number of
records returned. Depending on what you are trying to do, you can use a
dataset instead, count the number of records, return a parameter with the
number of records, etc.

-John Oakes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top