C H A P T E R 14
Using Data Readers
In Chapter 13, you used data readers to retrieve data from a multirow result set. In this chapter, we’ll look at data readers in more detail. You’ll see how they’re used and their importance in ADO.NET programming.
In this chapter, we’ll cover the following:
- Understanding data readers in general
- Getting data about data
- Getting data about tables
- Using multiple result sets with a data reader
Understanding Data Readers in General
The third component of a data provider, after connections and commands, is the data reader. Once you’ve connected to a database and queried it, you need some way to access the result set. This is where the data reader comes in.
Data readers are objects that implement the System.Data.IDataReader ...
Get Beginning C# 5.0 Databases, Second Edition 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.