To begin with, create an empty new ASP.NET Web Site Project
(File->New Web Site) within Visual Web Developer. We can then
connect and load our Northwinds database in the IDE. To-do this you can follow
one of two approaches:
Option 1: Connect to a local or
remote SQL 2000 or SQL 2005 database that has the Northwinds sample installed.
To-do this, go to the "Server Explorer" property window in Visual Web
Developer (choose View -> Server Explorer if it isn’t currently visible),
right-click on the "Data Connections" node and choose to add a new
database connection. You can then walkthrough a wizard to pick your SQL
database and load the Northwinds database in the IDE:
Figure 1
Option 2: If you don’t have a SQL
2000 or SQL 2005, you can alternatively use the free SQL 2005 Express Edition.
Download this .zip
file containing the Northwinds.mdf database file, and copy it to the "App_Data"
directory underneath your web site’s root directory. Click the "Refresh"
button in the solution explorer, and it will appear in the Solution Explorer:
Figure 2
SQL Express databases within the App_Data directory will
automatically show-up as a listed item in the Server Explorer property window
(note: I sometimes get a timeout error the very first time I expand a newly
copied SQL express database here – I think because it is generating the log
file the first time it is accessed. If this happens just click it again and it
seems to immediately expands
Figure 3
After the Northwinds database has been loaded using either
Option #1 or Option #2 above, you can expand, view, edit, and add to any of the
tables, stored procedures, views, triggers, etc with the database. You can
also use the query builder to test out and run queries against the database (or
right-click on a table and choose "Show Table Data" to see all of
it).