What is the Difference between Dataset and Datareader?

Answer Posted / vasudha.g.n

DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to DataSet
(Fetches all the rows at a time). DataReader is readonly so
we cannot do any transaction on them. DataReader will be
the best choice where we need to show the data to the user
which requires no transaction ie reports. Due to DataReader
is forward only we cannot fetch the data randomly. .NET
Dataproviders optimizes the datareaders to handle the huge
amount of data.

DataSet
DataSet is always a bulky object that requires lot of
memory space compare to DataReader. We can say the dataset
as a small database coz it stores the schema and data in
the application memory area. DataSet fetches all data from
the datasource at a time to its memory area. So we can
traverse through the object to get required data like
qureying database.

Is This Answer Correct ?    8 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to store decimal data in .net?

652


Explain the difference between c# and vb.net?

561


What is normal jit?

624


Explain the difference between import system.data.sqlclient and system.data.oledb?

561


What do you mean by serialization and deserialization and it's use.

613






what's ArrayList in .Net (VB.Net or C#).What's the advantageous using ArrayList.

578


What is the difference between c# and vb.net?

574


Name a feature which is common to all .net languages?

590


Explain jit?

556


What are the advantages of vb.net and c#?

647


What is the difference between value and reference types?

553


Thank you for replying to my Question regarding Barcodes in VB.net. My next question is that how to use Barcode Fonts in VB.net I need a small code to Generate Barcodes in VB.net from a string of Values. This is the only problem i am left with in my project. Any body can help me please.

2053


What is option strict?

530


What are different types of jit ?

601


What are all the differences between dispose and finalize()?

564