Interviews2 answers
DataReader and Data Set
2 Answers
Perfect
One more
Data reader is not serlizable so it can’t be returned from a webservice where as Dataset is serlizable.
Raj MishraPosted Sep 12, 2008, 4:30 AM EDT
DataReader
1. The data retrieved through a DataReader is read-only.
2. A DataReader lasts as long as the connection to the database is open. It can’t be persisted in a cookie or a session variable. Data Reader is connection oriented.
3. A DataReader is faster than a Dataset.
4. Data in a DataReader can be read forward only.
5. Can’t update a data source through a DataReader.
DataSet
1. The data retrieved through a DataSet is read and write.
2. A DataSet lasts only until the page is reloaded (posted back) unless it’s somehow persisted (for example, in a session variable). Dataset is not connection oriented.
3. A DataSet is slower than a DataReader.
4. Data in a Dataset can be read in both forward and backward direction.
5. Can make changes to data in a DataSet and then upload those changes back to the data source.
Shashi RayPosted Sep 3, 2008, 9:01 PM EDT

