How to: Install Sample Databases

Many Visual Studio topics and code samples require the ability to connect to a database, such as the Northwind sample database. If you are running SQL Server and the Northwind database is unavailable, see the SQL Server Books Online for information about installing it. If you do not have a copy of SQL Server, you can access the sample databases by installing SQL Server Compact 3.5, SQL Server Express Edition, or an Access version of Northwind.

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, click Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

Installing Databases

To install the Northwind and Pubs sample databases for SQL Server

  1. Open Internet Explorer.

  2. Go to the Northwind and Pubs Sample Databases Web site.

  3. Click Download.

  4. In the File Download box, select Save.

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

To install the Adventure Works sample databases for SQL Server 2000

  1. Open Internet Explorer.

  2. Go to the Adventure Works Cycles Database 2000 Web site.

  3. Click Download.

  4. In the File Download box, select Save.

  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. Open Internet Explorer.

  2. Go to the Access 2000 Tutorial: Northwind Traders Sample Database Web site.

  3. Click Download.

  4. In the File Download box, select Save.

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

Obtaining SQL Server Express Edition

SQL Server Express Edition is available for free, and you can redistribute it with applications.

Note

SQL Server Express Edition is required for Visual Basic 2008 Express Edition and Visual C# 2008 Express Edition users who use the Object Relational Designer (O/R Designer).

To download and install SQL Server Express Edition

  1. Start Internet Explorer.

  2. Go to the Microsoft Download Center Web site.

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

  4. Click Go.

  5. On the results page, click the link to the Microsoft SQL Server 2005 Express Edition download page.

  6. Follow the installation instructions on the Web site.

Security

Always check for product updates when installing additional software.

See Also

Tasks

Walkthrough: Adding a SQL Server Compact 3.5 Database to an Application and Deploying it

Walkthrough: Creating a SQL Server Express Database

Other Resources

Getting Started with Data Access

Connecting to Data in Visual Studio

Preparing Your Application to Receive Data

Fetching Data into Your Application

Displaying Data on Forms in Windows Applications

Editing Data in Your Application

Validating Data

Saving Data