Partager via


Data Source Wizard Drag-and-Drop Test

The Data Source Wizard Drag-and-Drop test validates performance of the Data Sources Wizard as an end-user tool to create a data-source connection to a third-party data source. Behind the scenes, the test verifies that the third-party data source object has a DSRef object attached and that it correctly supports drag-and-drop operations.

The Data Sources Wizard is initiated in response to a drag-and-drop action on the part of the end user, in which the user drags a data source object from Server Explorer to a designer surface. The Wizard should fully support establishing the connection to third-party data-source object; performing this test provides validation of the connection.

Test Procedure

  1. In Visual Studio, create a new Windows Application project.

  2. From the Data menu, select Show Data Sources. The Data Sources pane appears.

  3. From the Data Sources pane, click the Add New Data Source icon. This launches the Data Sources Wizard.

  4. In the Data Source Configuration Wizard, click Next.

  5. On the next screen, click New Connection and add a connection to the database using the generic provider.

  6. Make sure the new connection is selected in the combo box, and then click Next.

  7. Make sure the save connection as check box is selected to save the connection. Click Next.

  8. The Choose Database Objects page shows a view of available database objects. Verify that the following items are correctly displayed in the tree:

    1. Tables

    2. Views

    3. Stored Procedures

    4. Functions

    5. Correct columns for tables, views, stored procedures, and functions

  9. Select the objects to include in the dataset and click Finish. This creates a dataset and displays its contents in the Data Sources pane.

  10. Select a few objects in the Data Sources pane and drag them to the Windows Forms designer to create databound UI elements.

  11. Run the form and verify that data loads from the database. After verifying that the data loads, close the running application.

  12. In the Windows Forms designer, double-click the Save button to enter the code window for this button's button_Click event.

  13. Write code to update the data to the database and verify that it works. It should use the TableAdapter instance on the form.

  14. Run the program, load data, modify some values, and save the changes to the database.

See Also

Concepts

Validating End User Applications of DDEX