Difference between datareader and dataset?
Answer Posted / yasir a. mughal
 DataReader (Connection Oriented) is a forward only and
read only data while DataSet (Disconnected) is used to
maintain relationships between multiple tables.
 You can access one table at a time while it is define with
multiple tables.
 DataReader can't persists the data while DataSet can
persist the data
 DataReader operation is faster than DataSet operation.
 DataReader is connection oriented you can find the changes
in the database reflected in data reader immediately, where
as DataSet is pure disconnected one you will find the
changes only when you refresh the dataset using DataAdapter.
but conclusion....
Another often cited issue knows when to use DataReader as
opposed to DataSet objects. As a rule, if you don't need the
data once it has been read then uses a DataReader. The
DataReader offers a forward-only trip through data, whereas
DataSet allows you access to a group of data that may be
necessary to populate an ASP.NET Repeater or similar control.
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
What are the ado.net objects?
What are the parameters that control most of connection pooling behaviors?
What are the key events of sqlconnection class?
What is Dataset Object?
can we create synonymn in ms access,sql server,my sql if so explain me with example
Why do we use sqldataadapter?
What are the data access namespaces in .NET?
What is the default timeout specified for "sqlcommand.commandtimeout" property?
Define isolation?
How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?
Which object of ado contains datarow datacolumn collection?
What is ado.net full form?
What are the major difference between classic ADO and ADO.NET?
What are the advantages of oledb compared with other classes?
What are two important objects of ADO.Net?