<%@ Language=VBScript%> <% mes="" IsSuccess = false sServer = Trim(Request.Form("txtServer")) sPort = Trim(Request.Form("txtPort")) sUser = Trim(Request.Form("txtUser")) sPassword = Trim(Request.Form("txtPassword")) if Request("__action")="TestDB" then TestDB() end if Sub TestDB() Err.Clear() on error resume next Set objConn = Server.CreateObject("ADODB.Connection") if len(Err.Description)<>0 then mes = " " & Err.Description & " MySQL connection cannot be established." else objConn.ConnectionString = _ "DRIVER={MySQL ODBC 3.51 Driver};PORT=" & sPort & _ ";SERVER=" & sServer & _ ";UID=" & sUser & _ ";PWD=" & sPassword objConn.Open if len(Err.Description)<>0 then mes = " " & Err.Description & " MySQL connection cannot be established." else mes = " MySQL connection was successfully established." IsSuccess = true end if end if Set objConn = Nothing End sub Sub Alert(html) if IsSuccess then Response.Write "
Success:" & html & "
" else Response.Write "
Failure:" & html & "
" end if End Sub %> ASP test page.
ASP Features Test

This page allows you to check connectivity between the SQL client on your host and one of remote database servers. You should have working accounts on the database servers you want to test. Here you can test the ability to connect to the MySQL server.

<% if len(mes) > 0 then Alert(mes) end if %>
Test MySQL Connection

">

Test