Describe DataReader object

Describe DataReader object?

E

Expert

Verified

The DataReader object facilitates in recovering the data from the database in the read-only mode, forward-only,. The base class for every DataReader objects is a DbDataReader class.

DataReader object is returned as the result of calling ExecuteReader() method of a Command object. It enables faster retrieval of the data from the databases and enhances the performance of .NET applications by provided that rapid data access speed. Though, it is less preferred as compared to a DataAdapter object since the DataReader object requires Open connection till it completes reading all rows of a specified table.
The Open connections to read the data from the large tables consume resources of the system. When several client applications concurrently access the database by using a DataReader object, performance of the data retrieval and other related processes is considerably reduced. In this case, database may refuse connections to another .NET application until other consumers free the resources.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.