DbDataReader.Read() result

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi;

The docs for this say "true if there are more rows; otherwise false." The
way that is written says that there is a row after the row it is now on.

But the way it appears to work is when it returns false, you are now past
the last row. Is this correct?
 
Hi dave,

Yes, the Read method returns false when it has gone after the last row,
which mean EOF. Or true will be returned.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Which is why in all the DataReader examples you see, they say:

While dr.Read()

HTH
 
Back
Top