Peter,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Before I execute the Fill method of DataAdapter or the
> Read method of DataReader, is the resultset stored in network buffer or
> RAM
> or both?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
When you are using DataReader you are only getting pointer.
When you do a read () you are actually reading the record.
When you do Fill you are reading the record row by row, creating the
datatable and the underlying dataset.
It will be in stored in Asp.Net Worker Processes Virtual Memory and will
not be in NetworkBuffer until you bind to a dataset or try to send it
through the Wire.
--
Jay Balapa
http://jbalapa.blogspot.com
"Peter" <(E-Mail Removed)> wrote in message
news:52B80EB8-0B38-4857-AAC6-(E-Mail Removed)...
> Hi Cor,
>
> Thanks for your replies. One area that I'm still confused is the storage
> of the resultset. Before I execute the Fill method of DataAdapter or the
> Read method of DataReader, is the resultset stored in network buffer or
> RAM
> or both?
>
> Peter
>
> "Cor Ligthert[MVP]" wrote:
>
>> Peter,
>>
>> The dataadapter uses internal the datareader, the big difference as you
>> use
>> it, is that a datareader is reading row by row, while the dataadapter
>> stores the rows in a datatable (which can be in a dataset).
>>
>> Especially when you need any way to update the data than the dataadapter
>> is
>> very much preferable, however this can be as well if you use WindowForms
>> complex datacontrols as by instance the combobox and the datagridview.
>>
>> AFAIK can the datareader only index the resultset by indexing the fields
>> by
>> their appearance, the datatable can do that also by the given field names
>> or
>> columns.
>>
>> Cor
>>
>>
>> "Peter" <(E-Mail Removed)> schreef in bericht
>> news:F3D3F95C-129A-4241-BF83-(E-Mail Removed)...
>> >I want to get a better understanding in using DataReader and DataAdapter
>> >to
>> > retrieve data from MS SQL Server 2005. I'm using visual basic 2005 and
>> > .net
>> > 3.0.
>> >
>> > Is there any difference in retrieving data in MS SQL Server using
>> > DataReader
>> > and DataAdapter? I used to SQL Server Profiler to trace both and it
>> > seems
>> > they are the same.
>> >
>> > Is there any difference in network traffic? My guess is none.
>> >
>> > If I understand correctly, the data retrieved using DataReader will be
>> > stored in client's network buffer and the data retrieved using
>> > DataAdapter
>> > will be stored in client's memory. If I'm retrieving a large
>> > resultset,
>> > will the size of client's network buffer be a potential problem? How
>> > can
>> > I
>> > find out the size of the buffer?
>> >
>> > Ways in obtaining data from the resultset of DataReader:
>> > 1. Use the Read method of the DataReader
>> > 2. Load the resultset to a dataset using DataSet.Load method
>> >
>> > Ways in obtaining data from the resultset of DataAdapter:
>> > 1. Use the Fill method of the DataAdapter to populate a dataset
>> >
>> > Are there other ways to populate dataset from resultset of DataReader
>> > or
>> > DataAdapter?
>> >
>> >
>>
>>