Compartir a través de


Data Set Designer/Table Adapter Wizard Test with Existing Stored Procedures

The Data Set Designer/Table Adapter Wizard Test using existing stored procedures extends the Data Set Designer Drag-and-Drop Test by adding manipulation of existing stored procedures to data source objects dragged to the DataSet designer from the Visual Studio Server Explorer.

Test Procedure

  1. Create a new Windows Application project.

  2. Add a DataSet project item.

  3. From the Toolbox, drag a TableAdapter to the Dataset designer. The TableAdapter Configuration Wizard appears.

  4. On the Choose Your Data Connection page, add a connection to the database using the generic provider.

  5. Make sure the connection is selected in the combo box and click Next.

  6. On the Save the Connection String to the Application Configuration File page, click Next.

  7. On the Choose a Command Type page, select Use existing stored procedures and click Next.

  8. On the Bind Commands to Existing Stored Procedures page, choose existing stored procedures for each type of stored procedure and click Next.

  9. On the Choose Methods to Generate page, keep the default values and click Next.

  10. On the Wizard Results Page, click Finish.

  11. A TableAdapter is created using the stored procedures selected. Verify the following in the designer:

    1. Columns created for the DataTable

    2. The CommandText property and the Parameters collection on the TableAdapter

    3. Configuration of the Delete, Insert, Select, and Update commands for the CommandText property and Parameters collection

  12. Repeat steps 3–11 with the following scenarios:

    1. A single stored procedure for only the Select statement

    2. Parameterized stored procedures for Delete, Insert, Select, and Update commands

See Also

Concepts

Validating End User Applications of DDEX

Data Set Designer Drag-and-Drop Test