once data is fetched into dataset connection gets closed. but in datareader
connection is always maintained...then why datareader is fast and mainly
recommended ?

Answers were Sorted based on User's Feedback



once data is fetched into dataset connection gets closed. but in datareader connection is always m..

Answer / hhh

DataSet carry considerable overhead because of relations,
multiple tables,
While DataReader only readony and fawardonly stream of
data, it fatch only one row at a time. thats y its faster

Is This Answer Correct ?    9 Yes 0 No

once data is fetched into dataset connection gets closed. but in datareader connection is always m..

Answer / abhishek

datareader is forwardonly thus is fast and is mostly used
while retrieving the data from the database.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

Diff B/W DataSet vs DataTable

6 Answers   Star Wire,


What is openrowset?

0 Answers  


Which object holds only data and does not interact with data source?

0 Answers  


Explain executenonquery?

0 Answers  


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?

6 Answers   Wipro,


List the 4 common ado.net namespaces?

0 Answers  


How to you declare connection strings and how to you make use of web.config ?

3 Answers   MMTS,


What is ole used for?

0 Answers  


how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?

0 Answers  


How to work with disconnected data - the dataset and sqldataadapter?

0 Answers  


I loaded the dataset with a table of 10 records. One of the records is deleted from the backend, How do you check whether all the 10 records were present while updating the data(Which event and steps) and throw the exception.

2 Answers   Fulcrum Logic, Satyam,


what is ado.net

6 Answers   Karrox, SunGard,


Categories