what is the difference between dataadapter and datareader in asp.net using c# pls send important 5 points
what is the difference between dataadapter and datareader in asp.net using c# pls send important 5 points
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Keyur NarkhiPosted Apr 6, 2012, 4:22 AM
Below are the difference
DataAdapter
- It is used to retrieve data from database and place it into the dataset.
- It is used the Connection object ,to connect database and use command object to get the data.
DataReader
- this is also used for getting the data.It will read single row at a time.It is used mainly for,when you want to display data.
- It will increases the performance because it will fetch one row at a time in memory.
Thanks
VulpesPosted Apr 6, 2012, 4:56 AM
MuthuMari MPosted Apr 6, 2012, 4:32 AM
1.DataReader - we can read single row at a time
2. Connected Architecture
3.Data Reader is forward only & Readonly
only,it keeps single row at a time
data adapter :
DataAdapter - We can Read multiple rows at a time
Disconnected Architecture
DataAdapter is Bridge between Database and DataSet.
it is a multipurpose object ie, we can insert, update, delete throught dataadapter
Thanks.
If this post is useful then mark it as "Accepted Answer"