<% If Len(Request("dsn")) > 0 Then Set DBConn = Server.CreateObject( "ADODB.Connection" ) DBConn.Open "DSN=" & Request("dsn") DBConn.Execute "CREATE TABLE tbHostProTest (ID int)" DBConn.Execute "INSERT INTO tbHostProTest VALUES(1234)" Set Command = Server.CreateObject( "ADODB.Command" ) Set RS = Server.CreateObject( "ADODB.Recordset" ) Command.CommandText = "SELECT * FROM tbHostProTest" Command.CommandType = 1 Set Command.ActiveConnection = DBConn Set RS = Command.Execute End If %>
<% If Len(Request("dsn")) > 0 Then %>
Test Summary :
  • Created tbHostProTest
  • Inserted value "1234" into tbHostProTest
  • Retrieved values from tbHostProTest
  • Result :
  • <%=RS("ID")%>
    Test successful !
    <% RS.Close DBConn.Execute "DROP TABLE tbHostProTest" Else %> * Note : The database and the dsn must exist on the server where this script is.
    DSN :  
    <% End If %>