<%@ Language=VBScript %>
<!--#include file="./includes/sql.asp"-->
<!DOCTYPE html>
<html>
<head><title>DB Test</title></head>
<body>
<h1>Database Test Page</h1>
<%
On Error Resume Next
Dim rs
Set rs = objConn.Execute("SELECT COUNT(*) AS cnt FROM machines WHERE machinetypeid = 31")
If Err.Number <> 0 Then
    Response.Write("<p style='color:red'>ERROR: " & Server.HTMLEncode(Err.Description) & "</p>")
Else
    Response.Write("<p style='color:green'>Query successful! Switch count: " & rs("cnt") & "</p>")
End If
rs.Close
Set rs = Nothing
objConn.Close
%>
</body>
</html>
