Chapter 5: Reading Data using the Dataset Object

Chapter 5 - Reading Data using the Dataset Object
byJohn Kauffman, Fabio Claudio Ferracchiatiet al.?
Wrox Press ?2002

Overview

In this chapter, we're going to discuss a huge topic: the ADO.NET DataSet object, which enables us to represent very complex data (should we need to do so). It contains DataTable objects, which may be thought of as very similar to the tables in a database. These, in turn, contain DataColumn and DataRow collections. All of these objects are rich in functionality, and have lots of properties and methods - but rather than tortuously stepping through them, we'll focus on how to use them to provide solutions to some common tasks, and look at enough theory to troubleshoot our mistakes. More specifically, you'll learn about the following:

  • What a DataSet object is, and how it compares to a data reader

  • Populating a DataSet with data from both a database source and an XML file

  • Displaying the data within a DataSet by binding to a DataGrid control

  • Accessing columns and rows within a DataSet

  • Using a DataSet to work with data from different data sources

  • Creating relationships within a DataSet

  • Creating views of the data held within a DataSet

  • Sorting, filtering, and paginating the data displayed within a DataGrid

  • Using a DataSet as a source of dates for the ASP.NET Calendar control

This list doesn't explore every aspect of the System.Data.DataSet class, but it certainly includes the tools you'll require in order to tackle many of the scenarios you'll encounter. It's also a starting point to find out more information if and when you need it.



Beginning ASP. NET 2.0 and Databases
Beginning ASP.NET 2.0 and Databases (Wrox Beginning Guides)
ISBN: 0471781347
EAN: 2147483647
Year: 2004
Pages: 263

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net