Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Does a datareader

  Asked By: Magenta    Date: May 24    Category: Asp.net    Views: 612
  

I selected Some records from the Db into the
datareader.How can I know the Number of records
Returned.I tried all the properties But Failed.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Vivian Ruiz     Answered On: May 24

Since a DataReader can only see one record at a time it can't count any
upcoming records.

www.learnasp.com/freebook/learn/datatable.aspx
a datatable has what you want

 
Answer #2    Answered By: Harold Graham     Answered On: May 24

It can ... you use

reader.RecordsAffected but its tricky ... you have to ref it when used in
function parameter.

 
Didn't find what you were looking for? Find more on Does a datareader Or get search suggestion and latest updates.




Tagged: