Check if database is offline

Results 1 to 2 of 2

Thread: Check if database is offline

  1. #1
    Join Date
    Dec 1969

    Default Check if database is offline

    Hi,<BR><BR>I have a 30mb database on my server, and I have to remotely upload it atleast once a week. It takes me about half an hour to do so. During that period, when I try accessing the asp page that uses the database, I get the error message:<BR><BR>"[Microsoft][ODBC Microsoft Access Driver] Unrecognized database format"<BR><BR>Is there a way to check if the database is in the proper format? I want to display a message like "database being uploaded" if the database is not completely uploaded.<BR><BR>Thanks<BR>Kaustubh<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Why not just check for the error?

    &#060;%<BR>... <BR>On Error Resume Next &#039 ignore errors<BR>conn.Errors.Clear &#039 clear out any errors<BR>conn.Open ...<BR>Set errors = conn.Errors<BR>On Error GoTo 0 &#039 stop ignoring errors<BR>For Each oops In errors<BR>&nbsp; &nbsp; Response.Write oops.number & ": " & oops.description & "&LT;BR&#062;"<BR>Next<BR>%&#062;<BR><BR>Next time you have the DB off line, run that code to see what errors you get in the conn.Errors collection. Then write code that uses that technique and, in the FOR EACH loop, "filters" the errors, looking for the offline-related errors (and doing the appropriate thing...response.redirect to a "check back later page"??) and ignoring some of the silly warnings you get. Any unexpected error presumably causes a message to be sent to you (write to a log, send email, whatever) about the problem.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts