Creating a Typed DataSet

ADO.NET is comprised of classes. As you know, classes can be generalized—inherited from—to extend existing behaviors and add new behaviors. One such set of generalizations is to create typed DataSet, DataTable, and DataRow objects. (We'll speak in terms of typed DataSet objects, but keep in mind the same basic principle applies to other ADO.NET classes by way of supporting inheritance.)

In general, when you use a DataSet, you can access a DataTable in that DataSet through the DataSet.Tables collection property. The same is true of DataRow objects: you can access rows through the DataTable.Rows collection. The end result is complicated-looking object strings and indexed collections, for example, DataSet.Tables(0).Rows(1) ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.