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 does adodb stand for?
What is the difference between ADO and ADO.Net?
What is typed dataset ?
Explain executenonquery?
Does ado.net use odbc?
What is sqldatareader?
Which is better entity framework or ado.net?
Explain the architecture of ado.net?
Give an example that shows how to execute a stored procedure in ado.net?
What are the parameters that control most of connection pooling behaviours?
How many major types of connection objects in ADO.NET?
What is ole in vb?
What is sql connection in ado.net?
Which property is used to check whether a DataReader is closed or opened?
What are two types of transaction supported by ado.net?