Dataset Efficiency and the SqlDataAdapter

HanaPipers

New Member
Hi,<BR>When using the SqlDataAdapter to load a dataset (in memory xml) it appears that all data from a table in a select statement is loaded into the dataset, even if a select statement is only selects one record. I realise that all this data is not sent out to the browser, but still, for a large table this means that the server must load the whole table into its memory. Is this correct? Am I missing something? What if the table holds a million records - won't that slow things down?Yes indeed, a DataSet is anything but efficient. If you are needing read-only, forward-only efficient access to data use the DataReader classes (SqlDataReader and OleDbDataReader). They are synonymous to read-only, firehose Recordsets in classic ASP.
 
Back
Top