How to: Add New Data Connections in Server Explorer/Database Explorer
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Server Explorer/Database Explorer displays database connections beneath the Data Connections node. After a connection is established, you can design programs to open connections and retrieve and manipulate the data provided, or directly access and work with the data using Visual Database Tools.
Note
In the Visual Studio Express products, this window is named Database Explorer. In all other Visual Studio products, this window is named Server Explorer.
Note
The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.
On the Tools menu, choose Connect to Database.
The Choose Data Source dialog box opens. For more information, see Choose/Change Data Source Dialog Box.
Note
The Choose Data Source dialog box only appears the first time you create a connection. The selected data source becomes the default for each subsequent connection.
Select the type of data source to connect to from the Data source list. Click Continue and the Add Connection dialog box opens. The Add Connection dialog is specific to the data source selected in the previous step. For more information, see Add/Modify Connection Dialog Box (General).
Note
If the Add Connection dialog box is not set to the correct data source click the Change button to open the Choose Data Source dialog box and select a different data source.
Enter the information required to connect to the selected data source and click OK to create the connection.
The Add Connection dialog box closes, and the new data connection appears beneath the Data Connections node.
For example, if you create a data connection to a database called Northwind on a server named Server1, a new connection named Server1.Northwind.dbo appears beneath the Data Connections node.
In Server Explorer, expand the Data Connections node.
Select the desired database connection.
Press the DELETE key.
There is no effect on the actual database. You are removing the reference from your view.
Binding Windows Forms Controls to Data in Visual Studio
Binding Controls to Data in Visual Studio
Overview of Data Applications in Visual Studio
Connecting to Data in Visual Studio
Preparing Your Application to Receive Data
Fetching Data into Your Application