|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Previewing Data-Adapter Results
After configuring a data adapter, you can test how the adapter will fill a dataset.
To preview data-adapter results
- Create a data adapter. For details, see Creating Data Adapters.
- In the form or component designer, select the data adapter and then open the Properties window.
- At the bottom of the window, click Preview.
The Data Preview window opens.
- Select a data adapter from the Data Adapter list, or choose All DataAdapters to see the effect of completely populating the dataset.
- If the command referenced by the adapter's SelectCommand property requires parameters, fill in test parameter values in the Parameters grid.
- Click Fill Dataset to perform the command.
The results of the SelectCommand statement or stored procedure are displayed under Data. If the adapter gets data from more than one table in the data source (as might happen if it references a stored procedure that returns multiple results sets), the list of tables cataloged under Data tables appears twice. You can choose the table to preview by selecting it in the list.
- Repeat for other adapters or with other parameter values. By default, each result set generated by the preview is appended onto others already in the dataset preview. To start with an empty dataset, click Clear Table.