Chapter 2. Building Tables of Data

After completing this chapter, you will be able to:

  • Understand the ADO.NET classes used to create tables

  • Create strongly typed columns within a table

  • Indicate the primary key for a table

  • Design a table graphically or in code

The focus of all data in ADO.NET is the table—or more correctly, the DataTable. This class, located at System.Data.DataTable, defines a single table in which strongly typed column definitions and runtime data rows appear. By itself, a DataTable isn’t very interesting; it’s just a memory-based repository for data. It becomes useful only when you start employing ADO.NET and standard .NET Framework methods and tools to process the data stored in each table and data row.

Note

Some of the exercises in ...

Get Microsoft® ADO.NET 4 Step by Step now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.