O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

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

Using DataSet Objects

In some ways, the DataSet and its related classes resemble matryoshka—those nested wooden Russian dolls. A DataSet contains DataTable objects and DataRelation objects. A DataTable contains DataRow, DataColumn, and Constraint objects. Each of these classes resides in the System.Data namespace.

Rather than try to explain how each class is used one at a time, I will illustrate the basic functionality of the DataSet in this chapter by working through simple examples. Along the way, you’ll learn a little about each of the other classes I’ve just mentioned.

Creating a DataSet Object

Instantiating a DataSet object in code is straightforward. You simply use the New keyword in your language of choice. The DataSet class has one optional ...

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