When i make a request from the client(my PC) to the Server(SqlServe r),the data are sent back in packets.In my connection string i wrote:
Packet Size = 512, which means that each packet(Result Set) will be equal to that.Plus my SqlServer and application are in the same box which means that the buffer is a shared memory in my PC.
I execute this simple code :
Expand|Select|Wrap|Line Numbers
- con.open();
- SqlDataReader rdr= command.ExecuteReader();
- MyDataTable.Load(rdr);
- con.close();
Now,if i hover my mouse over the rdr object, i m able to see all data from SqlServer in Result Views of the drop down list, which it s strange.
I would expect only the first result set to see.
Each datarow in SqlServer is about 50 bytes, so a Result Set would normally contain about 10-11 datarows. So, how am i able to see 2300 datarows ?
Even if i scroll down to result number 1000, which means that definitely i am not in the first Result Set, i am able to go back and read my first DataRow.But since the SqlDataReader is not supposed to keep in memory
all the results, how am i able to see all the results ?
What am i missing here?