Delen via


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

The Data Set Designer/Table Adapter Wizard Test using new stored procedures extends the Data Set Designer Drag-and-Drop Test by adding manipulation of newly created stored procedures to data source objects dropped onto 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 the Create stored procedures option and click Next.

  8. Click the Query Builder button to graphically design your SQL string (or, alternatively, you can type a SQL statement directly in the SQL pane).

  9. After you create the stored procedure, and click Next.

  10. On the Create the Stored Procedures page, enter new stored procedure names or keep the default values. Click Next.

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

  12. On the Wizard Results Page, click Finish.

  13. Stored Procedures were created in the database and a TableAdapter was created that is hooked up to the new stored procedures. Verify that the following are correct in the designer:

    1. Columns created for the DataTable

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

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

  14. Repeat steps 3–13 with the following types of SQL statements:

    1. SELECT * FROM Table

    2. SELECT * FROM TableWithoutPrimaryKey

    3. SELECT * FROM TableWithMultipleColumnPrimaryKey

    4. SELECT <some columns> FROM Table

    5. SELECT <different datatypes> FROM Table

    6. SELECT * FROM Table WHERE Column=<NamedParameter>

    7. SELECT * FROM View

    8. SELECT * FROM Function

    9. SELECT COUNT(*) FROM Table WHERE Column=<NamedParameter>

    10. INSERT INTO Table VALUES(<NamedParameter1>,<NamedParameter2,…)

    11. UPDATE Table SET Column1=<NamedParameter> WHERE Column2=<NamedParameter2>

    12. DELETE FROM Table WHERE Column=<NamedParameter>

See Also

Concepts

Validating End User Applications of DDEX

Data Set Designer Drag-and-Drop Test