This asp.net tutorial explains, the difference between a dataset and datareader in ado.net in asp.net.
The dataset in ado.net represents an in-memory cache of data. The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects.
SharePoint 2016 Tutorial Contents
Difference between Dataset and Datareader asp.net
Below are few differences between dataset and datareader in ado.net in asp.net.
Dataset in asp.net
- Dataset is defined with multiple tables.
- It is a disconnected architecture.
- It can’t be defined without DataAdapter.
- Dataset is able to fetch a record in bi-direction.
- Dataset having read/write access.
- It comes under disconnected architecture.
- Dataset is slower as compared to DataReader.
Datareader in asp.net
- DataReader is a read-only and forwards only data i.e Read-Only access.
- You can access one table at a time.
- It comes under connected architecture.
- One of the most advantages is that it is much faster than the dataadapter.
- Using DataReader only one value can be accessed at a time from the database.
- Here the data is retrieved based on the select statement.
- We can’t do DML operations through DataReader.
You may like following asp.net tutorials:
- Create a data table at runtime in Asp.Net
- Asp.Net Validation Controls
- ExecuteNonQuery(), ExecuteReader() and ExecuteScalar() in Ado.Net in Asp.Net
- Call stored procedure in Asp.Net using C#.Net
- Master Page in Asp.Net
- Gridview in asp.net (step by step tutorial)
- Method Overloading and Method overriding C#.Net
- Delegates in C#.Net
Hope this asp.net tutorial explains the difference between dataset and datareader in ado.net in asp.net.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.