Select the Vista Start button and right click on Management Studio and choose Run as Administrator.This post covers accessing the Northwind database from Visual Studio or SQL Server Studio.
Instead, the focus is on setting up a system to access a database from the tools that programmers typically use during the development process. These tools aid developers by giving them a view of the database, by allowing them to modify the database, and by helping the developer establish connections to the database that they can use in their programs. Most people who want to connect to a database from a C program will want to complete the steps outlined in this post before they begin developing a database centric application. Establishing a Connection to a Database using SQL Server Manager Studio. Establishing a Connection to a Database using the ServerDatabase Explorer SQL Server Management Studio has a rich, powerful, intuitive interface. The ServerDatabase Explorer has a substantial subset of the functionality of SQL Server Management Studio but the interface is not as rich or as intuitive. It can, however, interact with other tools in Visual Studio in a simple drag and drop manner that is not possible when using Management Studio. Especially while you are learning what each tool provides in the way of services, I recommend installing and using both tools. Northwind.Mdb Sample Database Download The NorthwindInstalling the Northwind Database If it is not already installed on your system, you can download the Northwind database from the. By default, the install of the Northwind and Pubs sample databases creates a directory called C: SQL Server 2000 Sample Databases. A copy of the Northwind database and a script to recreate the database are located in this directory. ![]() After running the install for the Northwind database, you will probably want to attach to the Northwind database from Management Studio. Press F8 to go to the Object Explorer shown on the left in Figure 1. Now browse to the C: SQL Server 2000 Sample Databases directory and select NORTHWIND.MDB. Click OK twice to install the database. When you are done you should be able to see the database in the Object Explorer, as shown in Figure 1. Figure 1: Viewing the Northwind database in SQL Server Management Studio. The Object Explorer is shown on the left, details about the Customers table are shown on the right. Over time, you might delete or alter important data in the Northwind database. To restore the database, browse to the Northwind install directory and double click on the text file called instwnd.sql. This will open a script in Management Studio. The script is written in something called DDL, which stands for. This particular script provides a complete description of all the metadata in the Northwind database, and also all the rows of data found in the database. Press the Execute button to run the script and create or recreate the Northwind database. NOTE: If you are using Vista, you may have to take an extra step to avoid getting errors when running the script.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |