What?s the role of the DataReader class in ADO.NET connections?

Answer Posted / ajay singh negi

DataReader object is a simply used to read data from the
result sets and because of this feature we call this object
as forward only or read only cursor. It requires a live
connection with the data source. Threw looping you can
efficiently access all or a part of data from the result
set. Note you cannot directly initialize a DataReader
object. Execute reader method of the command object is used
to obtain a valid DataReader object. After using DataReader
you need to close the connection otherwise it is stayed
alive and it is explicitly closed.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oledb driver?

592


What is the role of data provider in ado.net?

625


What is the difference between typed and untyped dataset?

589


How to find the given query is optimised one or not?

601


What is the difference between executenonquery () and executescalar ()?

580






What is difference between sqldatareader and sqldataadapter?

579


What is data relation?

587


How to bind the controls(best practice) comboboxes to the data in the dataset?

621


What is the default Timeout for SqlCommand.CommandTimeout property?

612


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

1724


What is executenonquery ado.net?

597


What is ole word?

630


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?

642


How many major types of connection objects in ADO.NET?

694


How does entity framework work?

556