Creating a Database Project in VS 2005 (Page 1 of 4 )
Visual Studio's database projects replace the database support that was available in Visual Studio 6.0 with the Visual Interdev IDE, making a number of improvements and enhancements. A Visual Studio database project is folder and file based as you will shortly see in the tutorial.
It's a convenient focal point from which you can create, edit, test and deploy database scripts, all of which are under source control. This makes it an excellent tool for team based development. The Visual Studio IDE supports the project by providing its usual wizardry for data connections, a powerful query editor and various kinds of templates. This may be the most appropriate vehicle for integrating front end to back end in module-based applications. This basic tutorial shows you how such a project can be created to generate a SQL select query and execute it against a Microsoft Access database on a network node.
Creating a Database Project and establishing a database reference
With the VS Studio running click on File --> New Project. Expand the node Other Project Types by clicking on the + sign, and from the revealed items on the right, click on Database project as shown. It automatically points to Project1 for the project name; you change it to something of your choice. Herein it is called TestOledb. The project name and solution name are the same, and you have the option to create or otherwise handle the directory structure. The project file will be created by default at C:Documents and SettingsJayMy DocumentsVisual Studio 2005Projects (it will be different in yours), but can be changed to a different location.

You click OK to the above screen, which opens up the window Add Database Reference shown in the next picture, showing all the available database references. There are two references here: SQL 2005 server's Northwind database and the HR database on Oracle XE.

Next: Creating a new reference database >>
More Database Articles
More By Jayaram Krishnaswamy