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
 

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