The Microsoft SQL Server Desktop Engine

Chapter 1 - Displaying Data on the Web
byJohn Kauffman, Fabio Claudio Ferracchiatiet al.?
Wrox Press ?2002

As our final act in this chapter, we need to do something that will set us up for the rest of the book. During the course of the discussion so far, we've mentioned the names of a number of different databases, but it can't have escaped your attention that if we're going to demonstrate anything useful in the chapters to come, we need to set up a database of our own.

Our choice is to use the Microsoft SQL Server Desktop Engine (MSDE), which is a specialized version of SQL Server 2000. In this section, we'll explain what it is, why we've chosen to use it, and - most important of all - how you can get hold of it and install it.

A Smaller SQL Server

The first thing to say about MSDE is that it's entirely compatible with SQL Server, which is truly an enterprise-class database server. This means that the things you learn while using MSDE will stand you in good stead when you come to use SQL Server itself - it behaves in exactly the same way. From our perspective here, though, the immediate benefits of MSDE are:

  • It's freely distributable

  • It's currently sitting on your Visual Basic .NET discs, just waiting for you to install it

What this means is that as well as providing the perfect system for us to learn and experiment with, a complete web application can initially be produced and distributed without incurring any costs for the database server. If the system expands at a later date, it can be ported to the commercial distribution of SQL Server with next to no effort. The only features cut down from the full version of SQL Server are that the MSDE is optimized for (but not limited to) up to five connections at a time, that the maximum database size is limited to 2GB, and that some enterprise features are absent.

Throughout this book, the code samples and text will assume that MSDE is being used as the data provider, with the Northwind database (which is included with it) acting as the data source. To ensure that the code in the book will all function correctly, the next section details the installation of MSDE.

Note 

All of the features that MSDE supports are also supported by SQL Server. The converse is not true, however; some of the richer functionality of SQL Server is not present in MSDE. However, none of this functionality is required for any of the code in this book to operate correctly.

Obtaining and Installing MSDE

When Visual Basic .NET (or any of the various Visual Studio .NET products) is installed, an item called Microsoft .NET Framework SDK is added to your Start | Programs menu. Beneath this is an item called Samples and QuickStart Tutorials; if you select it, this is what you'll see:

click to expand

This page is self-explanatory: clicking on the first link will install the MSDE engine; clicking on the second will cause the sample databases - including Northwind, which we'll be using throughout this book - to be created.

This page will only appear once, so if you (or someone else) have been here before, you won't see it. Don't worry: you'll find the instmsde.exe and configsamples.exe files that these links invoke beneath the FrameworkSDK\Samples folder of your Visual Studio installation.

Ensure that you're logged on as a user with Administrator privileges on the current machine, and click on the first link (or run the executable). The following dialog will appear:

click to expand

When this has finished, there's no need to restart your machine. You can go straight on to the next step, which will produce another dialog:

click to expand

Once again, wait for this step to finish its work... and you're all done. But what exactly have you done? The best way to understand that is to open up Visual Basic .NET, ready for the quick tour in the next section.

Using MSDE

Once it has been successfully installed on the local machine, you need to make sure that the MSDE service has started. This procedure differs slightly from platform to platform, but the instruction here, for Windows 2000, should tell you all you need to know. From the Start Menu, open the Control Panel, and go to Administrative Tools | Services:

click to expand

The service called MSSQL$NetSDK is MSDE. Make sure that the Status and Startup Type are set to Started and Automatic, as they are here, and you can rest assured that from now, when Windows is running, MSDE will be running too. Close this window, head into Visual Studio, and choose the View | Server Explorer menu item. Right-click on the Data Connections item at the top of the Server Explorer window, choose Add Connection from the context menu, and you'll see the following:

click to expand

On choosing the appropriate settings in this dialog, the Server Explorer allows you to browse SQL Server databases, examining their content and performing some simple operations. To view the Northwind database that we just installed, you should make your dialog match the screenshot above. When you return to the Server Explorer, you'll be rewarded with a view of the database:

click to expand

Having made it this far, you can be sure that the MSDE database is ready for action, and with that our work in this chapter is done. It's been quite a fast ride, but we've covered a lot of ground in the hope that it will look familiar when you see it again in the chapters ahead. That slower, more careful journey begins in the next chapter.



Beginning ASP. NET 2.0 and Databases
Beginning ASP.NET 2.0 and Databases (Wrox Beginning Guides)
ISBN: 0471781347
EAN: 2147483647
Year: 2004
Pages: 263

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net