Share via


Adding New Data Connections in Server Explorer

Server 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.

To add a data connection in Server Explorer

  1. On the Tools menu, select Connect to Database.

    The Data Link Properties dialog box opens. For more information, see Data Link Properties Dialog Box.

  2. On the Provider tab of the Data Link Properties dialog box, choose an OLE DB provider. For more information, see Information on Data Link Properties and OLE DB Providers and Data Access Technologies.

  3. On the Connection tab of the Data Link Properties dialog box, provide the information requested. The input fields displayed vary, depending upon the provider selected on the Provider tab.

    For example, if you select the OLE DB Provider for Oracle, the Connection tab displays fields for server name and login. If you select the OLE DB Provider for SQL Server, the Connection tab displays fields for server name, type of authentication, and database.

  4. Click OK to establish the data connection.

    The Data Link Properties dialog box closes, and the new data connection appears beneath the Data Connections node, named for the server and database accessed.

    For example, if you create a data connection to a database called Nwind on a server named Server1, a new connection named Server1.Nwind.dbo appears beneath the Data Connections node.

To remove a data connection from Server Explorer

  1. In Server Explorer, expand the Data Connections node.

  2. Select the desired database connection.

  3. Press the DELETE key.

    There is no effect on the actual database. You are removing the reference from your view.

See Also

Adding New Servers in Server Explorer | Displaying Data Sources in Server Explorer | Connecting to Remote Resources with Server Explorer | Database Connections and Database References | Adding Items from Server Explorer | Adding a Database Reference to a Database Project | Introduction to Data Access with ADO.NET | Recommendations for Data Access Strategies | Web Data Access Strategy Recommendations