Database Results Error

Posted on 2006-06-06
Last Modified: 2013-12-24
In FrontPage I have a page the may return a "Database Results Error" when the database is not online. I want to remove this error because it shows the the directory of the database as follows:

Database Results Error
Could not find file 'D:\WWWRoot\\www\fpdb\database.mdb'.

Not only do I dont want to show the location of the database on the server but it changes the formatting of the TABLE where the database results region is located.

How can I remove this error, or at least, remove the directory?
Question by:jfs9900
    LVL 2

    Expert Comment

    On the page add this short script.
    <% on error resume next%>

    it will prevent users from seeing the cause of the error and try to run the next line of code. it will only work if your page is an asp (Which I presume) using VB

    If you use asp or VB then open the offending file in HTML view and add this script somewher in your connection string.

    connectionString = "DBQ=C:\inetpub\wwwroot\thissite\bd.mdb;driver={Microsoft Acess Driver (*.mdb)}
    ' this is the code to handel error -
    ' you can add as many response.write lines to add html to your error page
    on Error Resume Next
    Set ConnPassowrd=server.createObject(ADODB.connection")
    ConnPassword.Open ConnectionString

    If Err.Number <> 0 Then

    Response.Write("<br>An Error Occoured. Please Comeback tomorrow<br>")
    Response.Write("<br>Opps. An Error Occoured. Please Comeback tomorrow<br>")
    End If
    On Error Goto 0

    Author Comment

    When I try to put the <% on error resume next%> in the ASP code FP just overwrites it.

    Is there another place I can put the code?
    LVL 1

    Accepted Solution


    FrontPage will not allow to add/edit code in pages designed through Database Results Wizard. You can make a Database Connection check in your default document (default page); depending on the result you can redirect request to Results Page or show a user-friendly message.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
    The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now