Monday, January 26, 2009
Following are the major differences between “DataSet” and “DataReader” :-
- “DataSet” is a disconnected architecture, while “DataReader” has live connection while reading data. If we want to cache data and pass to a different tier “DataSet” forms the best choice and it has decent XML support.
- When application needs to access data from more than one table “DataSet” forms the best choice.
- If we need to move back while reading records, “datareader” does not support this functionality.
- But one of the biggest drawbacks of DataSet is speed. As “DataSet” carry considerable overhead because of relations, multiple tables etc speed is slower than “DataReader”. Always try to use “DataReader” wherever possible, as it’s meant specially for speed performance.
Also Read other Top Articles
- JSON Serialization in VS 2008
- Implementing Forms Authentication in Silverlight Application.
- Making GridView Rows or Individual Cells Clickable and Selectable.
- Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)
- How to pass values from User Control to Page or calling Page methods from User Control.
- What is WCF?
- New features in C# 4.0
- C# to VB.NET and VB.NET to C# online free converter tools.