RecordCount of a datareader

  • Thread starter Thread starter Steve Caliendo
  • Start date Start date
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
 
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

Back
Top