O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

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

Create a Typed DataSet

Problem

You want to access table names and field values using strongly typed property names instead of field-name lookup.

Solution

Create a typed DataSet using Visual Studio .NET or the XSD.exe command-line utility.

Discussion

A strongly typed DataSet is actually a set of classes that inherit from the DataSet, DataTable, and DataRow classes. Although the basic DataSet can be used with any table structure, a strongly typed DataSet is designed for use with a specific set of tables. For example, you might create a strongly typed North-wind DataSet that includes a set of DataTable and DataRow classes customized for use with tables such as Products, Employees, Categories, Shippers, and so on. The strongly typed classes allow you to ...

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