Microsoft KB Archive/265174

= FP2000: &quot;Connection Undefined&quot; Error When You View an Active Server Page in the Web Browser =

Article ID: 265174

Article Last Modified on 8/27/2002

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q265174



SYMPTOMS
When you attempt to view an Active Server Page (ASP) in the Web browser, you may receive an error message similar to the following:

Database Results Error

The database connection named &quot;Database1&quot; is undefined.



CAUSE
This behavior can occur if the Global.asa does not execute as expected.



RESOLUTION
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  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 (&quot;<&quot; and &quot;>&quot;) may appear as escaped HTML code (&quot;<&quot; and &quot;>&quot;). 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
 

TIME: <% =Time %>

DATA: <% =Application(&quot;XXX_ConnectionString&quot;) %>

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 &quot;DATA:&quot;, 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 &quot;More Information&quot; section for additional information.)


 * The Connection String in the ASP code is not defined in the Web settings.



MORE INFORMATION


204152 FP2000: Database Connection Undefined After Publishing Web

219170 FP2000: Error Browsing Database Results Pages After Publishing from Disk-Based Web

In addition, the following article contains more information on this subject. Although this article references Microsoft Visual InterDev, in this instance it can apply to FrontPage if the code returns data for the =Time function, but does not return data for the =Application variable.

188715 Global ASA Not Firing When Visual InterDev Made IIS 4.0 Application

Additional query words: ocsso front page

Keywords: kbprb KB265174

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.