Articles → ADO.NET → Difference Between The Dataset And Datareader In Ado.Net
Difference Between The Dataset And Datareader In Ado.Net
Difference
Dataset | Datareader |
---|
Disconnected architecture | Connected architecture |
No need to manually open and close the connection | Connection is manually open and close |
Data in Dataset can be inspected only when the whole dataset is filled | Datareader is a good option when retrieving a large amount of data |
Dataset represents a complete set of data including related tables, constraints, and relationships among the tables | The ADO.NET DataReader is used to retrieve read-only, forward-only data from a database |
Dataset is useful when you want to serialize the results | Datareader stores only one result at a time so it increases application performance and reduces system overheads |