LIS 558 - Active Server Pages

There are a number of different ways of setting up dynamic Web pages to provide access to databases. Some of these are illustrated in Kroenke, chapter 11. The following material deals with three methods available on the FIMS LAN. For demonstration purposes, emphasis will be placed on the first of these, which uses Microsoft FrontPage.

Microsoft Frontpage

To make use of Microsoft FrontPage to provide Web access to a database, you need to be assigned a FrontPage web or subweb by an administrator. A FrontPage web with the URL has been assigned to LIS 558. In addition, a subweb with the URL has been assigned for experimentation by interested students in the course.

To access a web in FrontPage, select File|Open Web..., and, in the "Open Web" dialog, type in the URL as the folder name and click on "Open". Here, as elsewhere in FrontPage, you will be prompted for your network password.

You should have set up your database initially with Access in the normal way. Note that FrontPage will recognize only tables; so any queries, forms, and reports that you design in Access cannot be carried over to the Web interface.

To import a database into a FrontPage web, select File|Import... and then, in the "Import" dialog, click on "Add File..." and browse for the database file. Generally, accept the automatic suggestion to place the database in a subfolder called fpdb.

To drop a database connection from a FrontPage web, select Tools|Web settings, go to the "Database" tab, select the connection name, and click on "Remove".

To create a new page, select File|New|Page..., select the kind of page that you want (usually "Normal Page"), and click on "OK".

To insert database results (or other database interaction) into a page, select Insert|Database|Results.... This starts the Database Results Wizard. You can also start the wizard from an existing database results object by right clicking on the object and selecting Database Results Properties... from the pop-up menu.

When saving a page, make sure to give it the extension .asp (not the default .htm or .html) if you want it to give dynamic access to a database.

You can use Access' Query By Example interface to develop a query in the original database. You can then view the SQL version of the query, copy the SQL code to the clipboard, and paste it into the box for the SQL query in FrontPage. Note the following:

To make a form on one page execute a query on another page, do the following:

When the form's "Submit" button is pressed, the first page should call on the second with a URL ending in a question mark plus a list of form object names and values, with each name separated from the corresponding value by an equals sign and the value-name pairs separated by ampersands; e.g.,

You can also put a query form on the same page as the results. To do this, click on "More Options" at step 3 of the Database Results Wizard, then click on the "Criteria" button in the "More Options" dialog, and set some criteria; also in the "More Options" dialog, to avoid seeing a "Database results error" message when the page is first viewed, click on the "Defaults" button and set up legal default values for the variables (these need not be values in the database, but must fit the data types for the corresponding fields); finally, at the end of the wizard, make sure that the checkbox for including the query form is checked.

Although FrontPage is oriented toward queries that just display data from the database, custom SQL queries that update the database can also be entered. In these cases, since SELECT is not usually used, the query yields no results to display in the database results table. Updating may, of course, fail if the user does not have write permission for the data.

To open an imported Access database so that you can view its tables, forms, and so on, double-click on its entry in the Frontpage window. If you try to open the database from Access by selecting it from an Access "Web Folder", Access will refuse your request.

Using .asp files created by Microsoft Access with the FrontPage server is somewhat complicated. The reason is that these files use System Data Source Names, but the FrontPage server does not create SDSNs for the databases in its webs, though it will recognize SDSNs that have already been created on other servers.

Microsoft Personal Web Server

Microsoft Personal Web Server 4.0 is decribed by Microsoft as
A desktop Web server that can be used to host a Web site on the corporate intranet, or to develop and test a Web site before hosting the site on an Internet Service Provider (ISP).
Unfortunately, the directory for the server must be on one of the local drives of the server's computer; it can't, for example, be on the U drive on the FIMS LAN. This makes remote updating a little difficult. You may be able to share files on the server with other workstations, however, by clicking on the "File and print Sharing" button at the "Configuration" tab of the "Network" dialog available from the Control Panel.

You can set up Microsoft Personal Web Server by running add-ons\pws\setup.exe on the Microsoft Windows 98 CD-ROM. It can also be downloaded from the Microsoft Web site.

When the server is active, its root directory can be accessed on the LAN with a URL consisting of http:// followed by the identifier of the server workstation. The default home directory on the server workstation, is c:\Inetpub\wwwroot. You can use the "Export" function in Microsoft Access 2000 to create .asp files to allow various kinds of access to your database on the server workstation. These pages can be accessed on the LAN with Internet Explorer 5 or Netscape Navigator 3 or above.

If the server is not enabled, a "not found" message will be given by the browser. If you attempt to open an .asp file as a local file in the browser, its type will not be recognized, if the browser is Netscape Navigator, or, if the browser is Internet Explorer, it may open it in Microsoft FrontPage.

Microsoft Access Data Pages

Microsoft Access Data Pages have the extension .htm and their format is thus recognized by the normal FIMS intranet server.

These pages work only in Internet Explorer version 5 or higher and only on the LAN. To make use of them in Internet Explorer, "Access data sources across domains" must be set to "Enable" or "Prompt" for the FIMS intranet: to do this without breaking the normal security for other sites, you are advised to add to the sites in the "Local intranet" zone.


Last updated November 23, 2001.
This page maintained by Prof. Tim Craven
E-mail (text/plain only):
Faculty of Information and Media Studies
University of Western Ontario,
London, Ontario
Canada, N6A 5B7