Shashi Ray
DataReader and Data Set
By Shashi Ray in ASP.NET on Sep 04 2008
  • Raj Mishra
    Sep, 2008 12

    Perfect One more Data reader is not serlizable so it can’t be returned from a webservice where as Dataset is serlizable.

    • 0
  • Shashi Ray
    Sep, 2008 4

    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.

    • 0

Most Popular Job Functions