Compare Data Reader & Dataset in ado.net?



Compare Data Reader & Dataset in ado.net?..

Answer / Shipra Mehrotra

DataReader and DataSet are two fundamental data containers in ADO.NET for handling relational data. Here's a comparison:nn- DataReader: It is a forward-only, read-only cursor that enables you to read data from a data source. It uses less memory compared to the DataSet since it doesn't cache the data. However, each operation requires a round trip to the database.nn- DataSet: It is a disconnected in-memory cache of data that contains multiple tables and their relationships. It can be written to XML for storage or transmission across a network. It uses more memory than DataReader due to caching but it's faster for read-write operations because it doesn't require round trips to the database.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What are the several execute methods of ado.net?

1 Answers  


Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!

1 Answers  


Define ado.net?

1 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 28 can datareader hold data from multiple tables?

1 Answers  


What is bubbled event can you please explain?

1 Answers  


What are the steps you will take to improve performance? Will you use dataset or datareader?

1 Answers  


What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?

1 Answers  


What is disconnected architecture in ado.net?

1 Answers  


What is microsoft ole db provider for sql server?

1 Answers  


How to check if a datareader is closed or opened?

1 Answers  


Explain the basic use of "dataview" and explain its methods.

1 Answers  


What is a column variable?

1 Answers  


Categories