How to: Install and Troubleshoot Database Components for Samples

Some of the Visual Basic samples use the Northwind database running on Microsoft SQL Server Express; others use SQL Server Compact 3.5. This page describes the installation process.

To download and install SQL Server Express

  1. In Windows, open Internet Explorer.

  2. Click the following URL: https://www.microsoft.com/downloads (Microsoft Download Center)

  3. In the Keywords box, type SQL Server Express.

  4. Click Go.

  5. On the results page, follow the link to the SQL Server Express download page and follow the instructions.

To install the Northwind and Pubs sample databases for SQL Server

  1. In Windows, open Internet Explorer.

  2. Click the following URL: https://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&DisplayLang=en (Northwind and Pubs Sample Databases)

  3. Click the Download button.

  4. In the File Download box, choose Save This File Now and click OK.

  5. After the file has downloaded, double-click the Nwind.exe file to install the database.

To install the Northwind sample database for Microsoft Access

  1. In Windows, open Internet Explorer.

  2. Click the following URL: https://www.microsoft.com/downloads/details.aspx?familyid=c6661372-8dbe-422b-8676-c632d66c529c&displaylang=en (Access 2000 Tutorial: Northwind Traders Sample Database)

  3. Click the Download button.

  4. In the File Download box, choose Save This File Now and click OK.

  5. After the file has downloaded, double-click the Nwind.exe file to install the database.

To determine your connection string

  1. Open Server Explorer/Database Explorer.

  2. Expand the Data Connections node and select the connection that you want.

  3. Connect to a database on your server.

  4. Right-click the new connection and choose Properties.

  5. In the Properties window, examine the Connection String property. Use this connection string in the samples. The connection string is found in one of these places, depending on the sample:

    • The code in the form.

    • The app.config file.

    • The project settings. Double-click My Project in Solution Explorer and find the connection string setting in the Settings tab.

    • The dataset files.

Troubleshooting

  • The samples expect that the sample database is installed on the local computer in the VSDOTNET instance. If the database is installed somewhere else, you will need to update the connection strings in the sample code.

Security

Always check for product updates when installing additional software.

See Also

Tasks

How to: Install Sample Databases

Other Resources

Connecting to Data with Server Explorer/Database Explorer