Content area
Full text
Applications: Microsoft Internet Information Server 4.0/5.0, Microsoft SQL Server 2000 Operating Systems: Microsoft Windows NT 4.0 / 2000 / XP
Today's Web-enabled business applications are almost universally database-driven. In the past, the most common method for connecting to databases over the Web had been to use Microsoft ActiveX Data Objects (ADO) together with ASP code. This, of course, is still a perfectly viable solution; however, SQL Server 2000 now allows you to connect to and manipulate databases directly over HTTP, facilitated by the powerful data-manipulation capabilities of XML. You can leverage these capabilities in your ASP applications in many ways, some of which we'll show you in this article.
The ground we'll cover
In this article, we'll provide a solid introduction to the topic of communicating with SQL Server 2000 databases through HTTP and IIS. First, we'll talk about how to configure the required virtual directories in Internet Information Server to bridge the gap between Web server and database server. Next, we'll show you some practical examples of how to specify SQL queries directly through a URL in your Web browser. Finally, we'll broaden our discussion to cover XML query templates and how to use an XSL stylesheet to format the results of a database query for display over the Web.
IS meets SOL Server
Before you can access SQL Server databases over HTTP, you need to configure a virtual directory on your Web server. To do this, launch the Configure SQL XML Support in IIS utility, located in the Microsoft SQL Server program group on your Start menu. The resulting application looks very much like the Internet Services Manager you're probably already familiar with; however, the utility only displays SQL Server virtual directories. At this point, there are probably no such directories defined on your server, so expand the tree view in the left pane of the utility, select your Web site, and then choose New I Virtual Directory from the Action menu.
The resulting New Virtual Directory Properties dialog box allows you to configure an access point between your Web server and your database server. At first, the process may look intimidating, but we assure you that it's really quite straightforward. Let's go through the process one step at a time by...





