what is a datareader objectthe datareader object


What is a DataReader object?

The DataReader object helps in retrieving the data from a database in a forward-only, read-only mode. The base class for all the DataReader objects is the DbDataReader class.

The DataReader object is returned as a result of calling the ExecuteReader() method of the Command object. The DataReader object enables faster retrieval of data from databases and increases the performance of .NET applications by giving rapid data access speed. However, it is less preferred as compared to the DataAdapter object because the DataReader object requires an Open connection till it completes reading all the rows of the specified table.

 

An Open connection to read data from large tables consumes most of the system resources. When multiple client applications at the same time access a database by using the DataReader object, the performance of data retrieval and other related processes is substantially decreased. In such a case, the database might refuse connections to other .NET applications unless other clients free the resources.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: what is a datareader objectthe datareader object
Reference No:- TGS0311097

Expected delivery within 24 Hours