Working with DataReaders
You can use the ADO.NET DataReader to retrieve a read-only, forward-only stream of data from a database. Results are returned as the query executes, and are stored in the network buffer on the client until you request them using the Read method of the DataReader. Using the DataReader can increase application performance both by retrieving data as soon as it is available, and (by default) storing only one row at a time in memory, reducing system overhead.
Each .NET Framework data provider included with the .NET Framework has a DataReader object: the .NET Framework Data Provider for OLE DB includes an OleDbDataReader object, the .NET Framework Data Provider for SQL Server includes a SqlDataReader object, the .NET Framework Data Provider for ODBC includes an OdbcDataReader object, and the .NET Framework Data Provider for Oracle includes an OracleDataReader object.
In This Section
- Retrieving Data Using a DataReader
Describes the ADO.NET DataReader object and how to use it to return a stream of results from a data source.
- Obtaining BLOB Values from a Database
Describes how to return a binary large object (BLOB) from a database by using a DataReader.
Describes the DbDataReader class and all of its members.
Describes the SqlDataReader class and all of its members.
Describes the OleDbDataReader class and all of its members.
Describes the OdbcDataReader class and all of its members.
Describes the OracleDataReader class and all of its members.