Difference between Dataset and Datareader in
ASP.NET
#1. Datareader
- Using datareader we can read the data readonly, forwordonly basis.
- Only one record in a memory at a time
- Faster
- Dose can not be transfer to data source where as in dataset
- Performance is better than dataset
- It will require you to open the connection throughout and so it is not suitable for interacting between different tiers.
#2. Dataset
- We can read and write and allow us to navigate through the records forward and backwards.
- Pulls the records from the data source and saves in IIS memory.
- Slower
- Holds data tables and has the information about relationship between those tables
- Data can be transfer to data source
- Performance is not as good as data reader because of the overhead.
0 comments:
Post a Comment