O'Reilly logo

Beginning C# 5.0 Databases, Second Edition by Vidya Vrat Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required