22.3. Previewing Data

You can also preview data for different data sources to ensure that the associated query will return the information you expect. In the database schema designer, right-click the query you want to test and choose Preview Data from the context menu. Alternatively, select Preview Data from the right-click context menu off any data source in the Data Sources tool window.

The Preview Data dialog is displayed with the object list defaulted to the query you want to test. Click the Preview button to view the sample data, shown in Figure 22-19. A small status bar provides information about the total number of data rows that were returned from the query, as well as how many columns of data were included.

If you want to change to a different query, you can do so with the "Select an object to preview" drop-down list. This list will contain other queries in the same data source, other data sources, and elsewhere in your solution. If the query you're previewing requires parameters, you can set their values in the Parameters list in the top right pane of the dialog. Clicking the Preview button will submit the query to the appropriate data source and display the subsequent results in the Results area on the Preview Data window.

Figure 22.19. Figure 22-19

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.