>From just about everything I have read, a DataReader reads only one
record at a time from a database and only caches that one record in
the client's memmory. However, a colleague of mine noted that this is
not exactly the case and proceeded to demonstrate this to me by
debugging through his code and breaking on a DataReader.Read() loop.
He then pulled the network cable from his computer as the database was
on a networked server and proceeded debugging through his code. To my
amazement, the DataReader continued to Read additional records. He
was using a SqlDataReader. Can someone explain this behavior to me?
The best I can come up with is this post on MSDN:
http://msdn2.microsoft.com/en-us/lib...yz(vs.71).aspx
Which states "Results are returned as the query executes, and are
stored in the network buffer on the client until you request them
using the Read method of the DataReader."
So, is a DataReader storing more than one record on the client
computer? What exactly is the article referring to as the network
buffer? An example would be helpful.
Thanks,
Chris