3.8. Streaming Data through a DataReader

SQL commands and stored procedures often produce sets of rectangular results in addition to output parameters and counts of rows affected by the commands. The results are rectangular in that each row (tuple) has the same number of columns and a column's data type does not vary from row to row. In accordance with the relational model, which mandates no support for multivalued data, columns usually contain only primitive data types. However, ADO.NET supports columns of type Object.

Managed providers retrieve rows and column values through the DataReader class. DataReader is composed of two standard interfaces—IDataReader and IDataRecord—plus data source-specific functionality. IDataReader contains methods ...

Get Essential ADO.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.