.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Articles >> .Net Framework >> Post New Resource Bookmark and Share   

 Subscribe to Articles

DataReader and Data Set

Posted By:Shashi Ray       Posted Date: September 03, 2008    Points: 15    Category: .Net Framework    URL: http://www.dotnetspark.com  



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.

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.

 Subscribe to Articles


Further Readings:

Author: Narayanan         Company URL: http://www.dotnetspark.com
Posted Date: February 06, 2012


Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend