Home All Groups Group Topic Archive Search About

DbDataReader.Read() result

Author
5 Nov 2005 2:18 AM
David Thielen
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?

--
thanks - dave

Author
5 Nov 2005 5:50 AM
Kevin Yu [MSFT]
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."
Author
5 Nov 2005 1:29 PM
S.M. Altaf [MVP]
Which is why in all the DataReader examples you see, they say:

While dr.Read()

HTH
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com


Show quote
"Kevin Yu [MSFT]" <v-k***@online.microsoft.com> wrote in message
news:yIoDdzc4FHA.3220@TK2MSFTNGXA01.phx.gbl...
> 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."
>

AddThis Social Bookmark Button