Adding a Database Reference to a Database Project
If you are working on a database project in Solution Explorer, you can add a database reference. A database reference contains connection information and is saved as part of the project.
To add a database reference to a database project
In Solution Explorer, right-click the Database References folder and choose New Database Reference from the shortcut menu.
The Add Database Reference dialog box appears with a list of current database connections.
Choose an existing database connection and skip Steps 3 – 4.
-or-
Click Add New Reference to make a new connection. The Data Link Properties dialog box appears.
On the Provider tab of the Data Link Properties dialog box, choose an OLE DB provider. For example, to connect to a SQL Server 2000 database, choose Microsoft OE DB Provider for SQL Server.
On the Connection tab of the Data Link Properties dialog box, provide the requested information.
The OLE DB provider you choose on the Provider tab affects what controls are visible on the Connection tab. For example, if you choose Microsoft OLE DB Provider for SQL Server in Step 3, the Connection tab includes selections for the server name, type of authentication, and the database name.
Click OK to establish the connection.
After you successfully add the connection, it appears in the Data Connections node in Server Explorer and the Database References node in Solution Explorer.
See Also
Setting a Default Database Reference for a Database Project | Deleting a Database Reference from a Database Project | Database Connections and Database References | Managing Data with Database Projects