To resolve this issue, use the following Active Server Page code to verify whether Active Server Pages are working and to test whether the Global.asa is executing with the Microsoft FrontPage connection information.
NOTE:
- Replace XXX in the following code example with your database connection name (for example, the SAMPLE database connection will be Sample_ConnectionString.)
- You may receive an error message if you copy and paste the example directly from this article to FrontPage. The angle brackets ("<" and ">") may appear as escaped HTML code ("<" and ">"). To work around this behavior, paste the script in a blank Notepad document, and then copy it from Notepad before pasting it into FrontPage.
Sample Code
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<p>TIME: <% =Time() %></p>
<!-- Replace XXX with the name of your database connection. -->
<p>DATA: <% =Application("XXX_ConnectionString") %></p>
</body>
</html>
The preceding code tests whether the following are true:
- The =Time() function returns the correct time on the server if Active Server Pages are functioning at all.
- The =Application() variable returns the necessary connection information for the program.
For example, the code may return something like the following:
TIME: 4:10:38 PM
DATA: DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\inetpub\wwwroot\fpdb\fpnwind.mdb
If the =Application() variable returns nothing after "DATA:", one of the following conditions is true:
- The Global.asa file is not being executed; this is probably because of the folder not being configured as a program. (See the "More Information" section for additional information.)
- The Connection String in the ASP code is not defined in the Web settings.