Difference between dataset and datareader.

Answer

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.

Dataset and datareader in ADO.NET - June 06, 2009 at 10:00 AM by Shuchi Gauri

Difference between dataset and datareader.

Dataset

a. Disconnected
b. Can traverse data in any order front, back.
c. Data can be manipulated within the dataset.
d. More expensive than datareader as it stores multiple rows at the same time.

Datareader

a. Connection needs to be maintained all the time
b. Can traverse only forward.
c. It is read only therefore, data cannot be manipulated.
d. It is less costly because it stores one row at a time

All ado.net Questions

Ask your interview questions on ado-net

Write Your comment or Questions if you want the answers on ado-net from ado-net Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---