<%@ Language=VBScript%> <% mes = "" IsSuccess = false sFile = Trim(Request.Form("txtFile")) sUser = Trim(Request.Form("txtUser")) if Request("__action")="TestDB" then TestDB() end if Sub TestDB() sPassword = Trim(Request.Form("txtPassword")) Err.Clear() on error resume next FilePath = Server.MapPath(sFile) if len(Err.Description)=0 then Set objConn = Server.CreateObject("ADODB.Connection") if len(Err.Description)<>0 then mes = " " & Err.Description & " MS Access connection cannot be established." else objConn.ConnectionString = _ "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & FilePath & _ ";User ID=" & sUser & _ ";Password=" & sPassword objConn.Open if len(Err.Description)<>0 then mes = " " & Err.Description & " MS Access connection cannot be established." else mes = " MS Access connection was successfully established." IsSuccess = true end if end if else mes = " " & Err.Description 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 Features Test
ASP Features Test

Here you can test the ability to connect to the Microsoft Access server.

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

Test