As in the previous chapter, We're going to conclude with a list of common pitfalls that you might encounter while experimenting with the examples presented in this chapter:
We've covered two major areas in this chapter: how to use data reader and command objects together, and how to display data in some of the controls that display multiple records.
The data reader is one of two ways to get data from a connection; the other is the dataset. Data readers use minimal resources, because they stream data from the data store into a display control, and then sever the data connection - the data doesn't have to sit in IIS memory. However, data readers can only read data (they can never write it), and you can only navigate forwards through the records. You can't create multiple tables or relationships, or read data from more than one source. In spite of these constraints, however, data readers are very useful - there are many web pages that just display data from a single table or stored procedure.
Data reader objects are closely linked to command
objects for two reasons. First, the latter's
property holds a description of the data to be
read. Second, it is the command object's
method that actually creates and
initializes the data reader object. The
property can store a table
All data-aware ASP.NET controls can be categorized
into one of two groups: single-value, and multiple-value. In this
available for some list controls. After the user clicks, we go to a
At the end of the chapter, we