Add Dataset Dialog Box

Allows you to select a dataset to add to a form or component. Specifically, this creates an instance of a dataset class. You can add an instance of either an existing typed dataset or a new, untyped dataset. For more information about typed and untyped datasets, see Introduction to Datasets.

This dialog box appears when you drag a DataSet item from the Data tab of the Toolbox onto the design surface of a form or component designer. When you finish with the dialog box, an instance of the dataset class you select is added to the form or component. The instance of the dataset uses the name of the dataset plus a sequential number. For example, if the dataset is named Dataset1, the first instance is named Dataset11, the second instance is named Dataset12, and so on. You can change the name of an instance on the form or component in the Properties Window.

  • Typed Data Set
    When selected, creates an instance of a dataset class already in your project. You can select from any dataset class defined using an XML Schema (.xsd) file. This might be a dataset that you created or generated earlier, one that you are referencing from an XML Web service, or one that is exposed by a namespace referenced in your project. For more information about how to create a typed dataset, see How to: Create a Typed Dataset.

  • Name
    Allows you to select or enter the name of a dataset class. You can use any dataset in the current project that has an XML Schema (.xsd file) and a corresponding class file (for example, a .vb file). Alternatively, you can enter the name of a dataset that you know will be available when the form or component is running.

  • Untyped Data Set
    When selected, creates an instance of a new, untyped dataset in your form or component — that is, a dataset of type System.Data.Dataset. You would choose this option if you intended to allow the data adapter to create the schema when the dataset is filled or if you intended to add data tables and columns to the dataset programmatically.

See Also

Tasks

Walkthrough: Creating a Dataset with the Dataset Designer

Concepts

ADO.NET DataSets

Working with Datasets in Visual Studio

Preparing Your Application to Receive Data

Fetching Data into Your Application

Binding Controls to Data in Visual Studio

Editing Data in Your Application

Validating Data

Saving Data

Other Resources

Overview of Data Applications in Visual Studio

Connecting to Data in Visual Studio