Using Visual Studio .NET with DataSet
To generate a strongly typed DataSet in Visual Studio .NET, right-click in the form designer window, and then
click Generate Dataset. This creates an .xsd (XML Schema Definition) file, as well as a class file, and then adds them to
your project. Be sure that one or more DataAdapters have been added to your Windows form before doing this. Note that the
class file is hidden. To see it, click the Show All Files button located in the toolbar of the Solution Explorer window. The
class file is associated with the .xsd file.
To add relations to a strongly typed DataSet , open the XML Schema Designer by double-clicking the schema file in the
Solution Explorer window, and then right-click the table to which you want to add a constraint. On the shortcut menu, click
Add New Relation.
An alternative method for generating a strongly typed DataSet in Visual Studio .NET is to right-click the project in the Project
Explorer, choose Add Files, and then select dataset. A new .xsd file will be created. From there you can use Server Explorer
to connect to a database and drag table(s) onto the xsd file.