FC It depends on what client-server you mean.
Some scenarios:
Client = Web browser; Sever1 = IIS; Server2 = seperate SQL Server
On IIS server in ASP.Net Code:
da.Fill(ds);
What happens:
1. A sql statement is run on SQL Server. SQL server creates a temp
table of results in its memory space.
2. This sends one record at a time to the IIS server and the records
are inserted in the dataset which is in the memory space of the Asp.Net
App.
3. You are then most likely generating html (raw text) to represent
the data to the client and the html goes accross the net to client
(this had better not be Millions or even hundreds of records). The
html (not a dataset) is loaded into the memory of the clients Browser
App.
If client is .Net windows app and has called a method that returns a
dataset and IIS is hosting a .Net remote component then step three
becomes:
3. The DataSet is serialized into XML sent accross the wire to the
client who recieves the stream deserializes it back into a dataset
where it is now stored in the memory of the client app.
So the answer is it uses memory everywhere!
Hope this starts to answer your question.
Cecil Howell
MCT, MCSD, MCAD.NET, MCETRG.NET