What is difference between dataset and datareader

Q

What is difference between dataset and datareader ?

✍: Guest

A

Following are some major differences between dataset and datareader
? DataReader provides forward-only and read-only access to data, while the DataSet object can hold more than one table (in other words more than one rowset) from the same data source as well as the relationships between them.
? Dataset is a disconnected architecture while datareader is connected architecture.
? Dataset can persist contents while datareader can not persist contents, they are forward only.

2007-10-24, 4976👍, 0💬