Condividi tramite


How to: Edit TableAdapter Queries

You edit TableAdapter queries with the TableAdapter Query Configuration Wizard in the Dataset Designer. You should modify a TableAdapter query when it no longer suits the needs of your application. (Alternatively, you can create additional queries on the TableAdapter. For more information on adding new queries, see How to: Create TableAdapter Queries.)

Note

If the TableAdapter Configuration Wizard opens instead of the TableAdapter Query Configuration Wizard, you might have selected the TableAdapter's main Fill query and not one of the TableAdapter's additional queries. For information on editing the TableAdapter's main Fill query, see How to: Edit TableAdapters.

TableAdapter with multiple queries

To edit a TableAdapter query

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

  2. Select the TableAdapter query you want to edit.

  3. Right-click the TableAdapter query and select Configure.

    The TableAdapter Query Configuration Wizard opens, ready for you to modify the query or stored procedure for that query.

  4. Complete the TableAdapter Query Configuration Wizard with the changes that you want. For more information, see TableAdapter Query Configuration Wizard.

See Also

Concepts

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

TableAdapters

Connecting to Data in Visual Studio

Data Walkthroughs