This documentation is archived and is not being maintained.

How to: Change the Design-Time Connection String (Devices)

Visual Studio 2008

A design-time connection string is created by default when you create a SQL Server Compact 3.5 data source for your project. Visual Studio uses this string to connect to the database at design-time to retrieve schema information. During the course of project development, you might want to change this string.

Distinguish this string from the run-time connection string. For more information, see Connection String Property, File Properties Dialog Box (Devices).


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 change the design-time connection string

  1. In Solution Explorer, double-click the .xsd file to open the DataSet Designer.

  2. Right-click the TableAdapter, and then click Properties on the shortcut menu.

  3. Expand the Connection property.

  4. Type a new value for ConnectionString.

    Security noteSecurity Note:

    Including a password in a connection string represents a security risk. For more information, see Securing Databases.