Diff. b/w DataReader and DataSet?
Answers were Sorted based on User's Feedback
Answer / g.ramesh
DataReader is connected Architecture.
DataSet is Disconnected Architecture.
Is This Answer Correct ? | 19 Yes | 1 No |
Answer / mukul anand
Datareader object is used to directly connect with the data
source and Dataset object is used to create a cache of the
original data source and then retrieve or update the date in
the dataset. It is a disconnected enviornment.
Is This Answer Correct ? | 12 Yes | 1 No |
Answer / vivek
First of all both are used for storing data in the front
end.
DataReader:-
1)It is connection oriented.4
2)It is faster because every data must travels through this
object.Even dataset also accesses data through this object.
3)Its navigation is forward only and and read only object
4)It can not be connected to multiple backends at a time
because of connected oriented.
5)Data reader is having record pointer to point the record
6)At a time it can point to only record.
7)we can not know how many records are there in datareader
8) By default It does not point to any record
9)Always it takes recference from the Resultset in the
database.for every it goes to resultset and fetches record
from resultset.
10)By default it supports online update.
DataSet:-
1)It is disconnected because it doesnot know about the
datasource
2)It is slow of its fat structure
3)It is useful for the offline retriving data.
4)It indepedent of Backend
5)Once the data is accessed it is independent of backend we
can make any modifications to that data.
6)Navigation is possible in any direction
7)It doesnot have the record pointer to point record
8)Logically we have to create record pointer.
9)It can have any type of data from different databases.
10)It uses "diffgram" to store the data in the form of xml
format
11)By default it supports Batch Sql update
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / tejas mer
DataReader is connected architecture and it's read-only, forward only type, so when you just want to display the data better to use it, it consumes less memory with compare to dataset as well.
DataSet is we can say in-memory representation of the data.
It's disconnected architecture.
Contains DataTables, which are further divided into Datarows and Datacolumns.
Also contains DataRelationships and Contraints...
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sandeep singh shekhawat
Data Reader is forword only it read one by one row. when it reach end the table then need to another connection open for it. it object create by command object method execute reader.
Data set is used for disconnect approch.It can have more than one table.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / anup kumar
DataReader works in connected mode means no data Manipulation
Possible. where DataSet Works in Connected and Disconnected
mode both.there is in-build memory in DataSet. it is
collections of Tables and Every table is collection of rows
and columns.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / santosh
data reader is the connection oriented architecture, it is
forward approach, and its give more perfomanc, datareader is
only read the data.
dataset is the disconnection oriented architecture, it is
forward and backward approach and it is slow compare to
datareader, dataset is read and write.
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / reetesh kumar
The DataReader is a important class of DataProvider
namespace and The DataSet is a also important class of Data
namespace.
Is This Answer Correct ? | 0 Yes | 3 No |
describe about the ado.net object model
Explain what are acid properties?
Why DataReader is Forward Only?
What is ole2 format?
What is datatable?
Give an example of a .net application which connects to microsoft access database using ado.net classes.
How to add a javaScript function in a datagrid?
What is difference between datagridview and datagrid control in winforms?
Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
Execute nonquery returns no. of afected rows.So if my stored procedure hav lot of select stmnt, delete stmnt, insert stmnt..then what does execute nonquery returns in this case?
What is ado.net connection?
What is execute scalar in ado.net?