How to: Preview Data in a Database (Devices)

The following steps assume that you have a SQL Server Compact 3.5 database available in the Server Explorer window. For more information, see How to: Create a Database (Devices).

You can preview data outside a project by using Server Explorer, or within a project by using the Data Sources window, where you can also parameterize the query that produces the view. For more information, see How to: Create Parameterized Queries (Devices).

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To view data by using Server Explorer

  1. On the View menu, click Server Explorer.

  2. In the Server Explorer window, expand the data connection to expose the table listing.

  3. Right-click the table whose data you want to view, and then click Open.

To view data by using the Data Sources window in a project

  1. On the Data menu, click Show Data Sources.

  2. In the Data Sources window, right-click the data source whose data you want to view (for example, a table).

  3. On the shortcut menu, click Preview Data.

  4. In the Data Preview dialog box, click Preview.

To view data by using the smart tag on the datagrid control

  1. In the designer, click the smart tag on the datagrid control.

  2. On the DataGrid Tasks shortcut menu, click Preview Data.

  3. In the Preview Data dialog box, select the object to preview, and then click Preview.

    The data appears in the Results box. The number of columns and rows in the grid is also displayed at the bottom of the Preview Data dialog box.

See Also

Concepts

Using SQL Server Compact 3.5 Databases (Devices)