Поделиться через


How to: Open Queries

You can open an existing query in Query and View Designer by using either the Open and Run or Design commands. Either one will open the query in Query and View Designer. The difference is that Open and Run opens with only the Results pane showing whereas Design opens the query with all panes.

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 open query results in the Results pane

  1. Open the project that contains the query.

  2. Expand the Queries folder and right-click the query you want to open.

  3. From the shortcut menu click Open and Run.

    Query and View Designer's Results pane now displays the data that the query retrieves. To display other panes, from the Query Designer menu, point to Pane, and then click the pane you want to open.

To open a query in all panes

  1. Open the project that contains the query.

  2. Expand the Queries folder and right-click the query you want to open.

  3. From the shortcut menu click Design.

Note

By default the Query and View Designer opens all of its panes (SQL, Criteria, Diagram, and Results), but that default can be changed in the Options dialog box. To open these panes if they are closed, from the Query Designer menu, point to Pane, and then click the pane you want to open.

See Also

Tasks

How to: Save Queries

Concepts

Working with Data in the Results Pane

Other Resources

Performing Basic Operations with Queries