N
narshe
I'm trying to figure out how the SqlDataReader works, and this is my
main question:
When SqlCommand.ExecuteReader() is called, are all rows of the query
returned immediately? This would mean the a call to reader.Read() would
just return the first row from the underlying data. Or does a call to
reader.Read() fetch the next row from SqlServer?
I've been digging through a watch of SqlDataReader, and can see that
the reader holds a row of data at a time. I would think it's getting
it's rows from the command, but I really can't find much else.
main question:
When SqlCommand.ExecuteReader() is called, are all rows of the query
returned immediately? This would mean the a call to reader.Read() would
just return the first row from the underlying data. Or does a call to
reader.Read() fetch the next row from SqlServer?
I've been digging through a watch of SqlDataReader, and can see that
the reader holds a row of data at a time. I would think it's getting
it's rows from the command, but I really can't find much else.