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 are the pre-requisites for connection pooling?

713


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?

748


Define ado.net?

785


What are the difference between readonly vs. Const?

671


Which object of ado contains datarow datacolumn collection?

690


What are two types of transaction supported by ado.net?

736


What does ole stand for in excel?

826


What is DataRowCollection?

819


How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?

754


How do you find the count of records in a dataset?

663


What is the difference between typed and untyped dataset?

689


List the 4 common ado.net namespaces?

859


Explain the difference between data reader and data adapter?

682


What is difference between executenonquery and executequery?

672


What is ado.net tutorial?

676