Difference between dataset and datareader.Dataset:
- DataSet object can contain multiple rowsets from the same data source as well as from the relationships between them. - Dataset is a disconnected architecture - Dataset can persist data.
Datareader:
- DataReader provides forward-only and read-only access to data. - Datareader is connected architecture - Datareader can not persist data.Difference between dataset and datareader.Dataset:
1. Disconnected. 2. Can traverse data in any order front, back. 3. Data can be manipulated within the dataset. 4. More expensive than datareader as it stores multiple rows at the same time.
Datareader:
1. Connection needs to be maintained all the time. 2. Can traverse only forward. 3. It is read only therefore, data cannot be manipulated. 4. It is less costly because it stores one row at a time.
|