Difference between datareader and dataset?

Answer Posted / chitaranjan mallick

- Data Reader apply only Select Statement, It can featch data from multiple Table Through Multiple Select Statement separated by Semicolon(;) Likes For Ex:
SqlCommand cmd=new SqlCommand("Select * from Emp";" Select * From Dept",Con);
DataReader dr=cmd.ExecuteReader();
dr.NextResults();
Here NextResults() Navigate from One Tables to Anather Tables
- It is Readonly, It can featch single Record At a Time..

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is connection pooling and what is the maximum pool size in ado.net connection string?

720


Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?

888


Why is it important to close an ado.net application?

765


What is the difference between Data adaptor and Data set?

788


How can we perform transactions in .net?

790


What are the parameters that control most of connection pooling behaviors?

759


Explain the differences between oledb sql server, oledbdotnet provider?

756


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

730


Does dapper use ado.net?

786


Why is stored procedure used in ado.net?

769


What is the default Timeout for SqlCommand.CommandTimeout property?

738


What is serialization and de-serialization in .net? How can we serialize the dataset object?

719


What is difference between datatable and dataset?

740


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

1026


What are the differences between OLEDB and SQLClient Providers?

779