Which operation is more effective,Fill DataSet or SqlCeDataReader

  • Thread starter Thread starter Peter King
  • Start date Start date
P

Peter King

Hi All,
Because of the limit of the CPU speed and memory space,I want to use a
effective operation to read the recordset.And there are two way for
implement this ,using a SqlCeDataAdapter::Fill the DataSet and using
SqlCeDataReader .
Which one is better?
Thanks.
Peter
 
Fill() = DataReader + store data in DataSet.



Usually Fill() spends 90-95% of the time in DataReader and 5-10% are spent
moving data to DataSet and checking for constraints.



Keep in mind DataAdapter and DataReader have completely different semantic
and generally they are not replaceable.

DataAdapter loads all data into memory right away so it is directly
accessible to the application.

DataReader reads one record at a time. If you don't need direct access to
records and can process one record at a time, using DataReader would be more
efficient.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
You could also try SqlCeResultSet. It's new to CF 2.0. The syntax and
the way it works it's very similar to DataReader but everybody say it's
faster.

Regards.
 
Back
Top