Freigeben über


How to: Start the TableAdapter Configuration Wizard

The TableAdapter Configuration Wizard creates and edits TableAdapters in strongly typed datasets. The wizard creates TableAdapters based on SQL statements you enter into the wizard or on existing stored procedures in the database. The wizard can also create new stored procedures in the database based on SQL statements you enter into the wizard.

To start the TableAdapter Configuration wizard to create a new TableAdapter

  1. Open your dataset in the Dataset Designer. For more information, see How to: Open a Dataset in the Dataset Designer.

    Note

    If you do not have a dataset in your project, see How to: Create a Typed Dataset.

  2. If you are creating a new TableAdapter, drag a TableAdapter object from the DataSet tab of the Toolbox onto the Dataset Designer.

  3. On the Choose Your Data Connection page, select a data connection from the list of currently available connections, or select New Connection to create a new connection.

To start the TableAdapter Configuration wizard to edit an existing TableAdapter

  1. Open your dataset in the Dataset Designer. For more information, see How to: Open a Dataset in the Dataset Designer.

  2. Right-click the TableAdapter in the Dataset Designer and choose Configure. The wizard opens to the Generate the SQL statements page or the Bind Commands to Existing Stored Procedures page, depending on how the TableAdapter was originally configured.

  3. Complete the wizard.

See Also

Tasks

How to: Connect to Data in a Database

How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component

How to: Create a Lookup Table with the Windows Forms BindingSource Component

Walkthrough: Displaying Data on a Windows Form

Concepts

Binding Windows Forms Controls to Data in Visual Studio

TableAdapter Overview

Creating and Editing Typed Datasets

Data Sources Overview

Validating Data

Other Resources

Data Walkthroughs