can someone help me?

sometimes when my page (connecting with MySQL database) can't open normally, page will like this :

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[TCX][MyODBC]Can't connect to MySQL server on '' (10061)

even this only for a while (5 - 10 minutes) but this bother me.
can i detect connection between my asp page with MySQL server? if MySQL is running then page will open normally and if MySQL server is off then page will redrect to 'maintenance page'.


This was posted on a previous thread.

On Error Resume Next
Dim sConnection, objConn , objRS

sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username;PASSWORD=mysql_password; OPTION=3"

Set objConn = Server.CreateObject("ADODB.Connection")

If Err.Number <> 0 Then
Response.Redirect "maintenance.asp"
'continue coding here

Set objConn=Nothing
End If

Here is the link.