Share via


Visual Studio Transact-SQL Editor

Beginning with Visual Studio 2010, the Transact-SQL Editor is supported for SQL Server Compact databases. You can use the Transact-SQL Editor in Visual Studio 2010 SP1 to:

  • Create and execute Transact-SQL scripts and queries against a SQL Server Compact database. 

  • Modify definitions of database objects such as tables, views, and indexes.

  • View and save detailed estimated and actual query show-plans for SQL Server Compact databases.

Important

The Transact-SQL Editor is supported for SQL Server Compact databases beginning with Visual Studio 2010. Earlier versions of Visual Studio do not provide support for using the Transact-SQL Editor on SQL Server Compact databases. Visual Studio 2010 does not provide support for using the Transact-SQL Editor on databases created with earlier versions of SQL Server Compact.

The following features of the Transact-SQL Editor are not supported for SQL Server Compact databases:

  • Database Connection Context

  • SQL CMD Mode

  • Include Client Statistics

  • Intellisense Enabled

  • Validate SQL Syntax

You can use the following procedure to open the Transact-SQL Editor and connect to a SQL Server Compact database from the Data menu in Visual Studio.

To open the Transact-SQL Editor and connect to a SQL Server Compact database

  1. In Visual Studio, on the Data menu, point to Transact-SQL Editor, and then select New Query Connection.The Connect to Server dialog box opens.

  2. In the Server type drop-down list, select SQL Server Compact.

  3. In Database file, browse to the location of the SQL Server Compact database file.

  4. If required, enter a password for the database.

  5. Click Connect. The Transact-SQL Editor opens.

You can also open the Transact-SQL Editor from the Transact-SQL Editor toolbar or from the File menu. For more detailed information about the features provided by the Transact-SQL Editor and how to use them, see the Visual Studio 2010 documentation.