Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Line 1: Error Type:
Line 2: Microsoft JET Database Engine (0x80040E10)
Line 3: Too few parameters. Expected 1.
Line 4: /sandbox/PagingRS/TMPnpdob6i7g.asp, line 76
Line 1: Gives you a descriptive header indicating that this is an error
Line 2: Gives you the technical details of the error. Copy this line and paste it into a search engine. You'll be surprised as to what you will get in return.
Line 3: Gives you a user friendly description of the error at hand.
Line 4: Gives you the ASP file and Line number within that file of where the error is occurring.
<< a bunch of code above >>
</body>
</html>
<!--#include file="debugging.asp"-->
strSQL = "select * from tablename where myName = " & request.form("myName")
Response.Write strSQL
Response.End()
select * from tablename where id = Brian Gaines
strSQL = "select * from tablename where myName = '" request.form("myName") & "'"
On Error Resume Next
If Err.Number > 0 Then
Response.Write "<FONT SIZE=5><B>" & "VBScript Errors:" & "</B></FONT><P>"
Response.Write "<B>" & "Error Number: " & "</B>" & Err.Number & "<P>"
Response.Write "<B>" & "Error Descr: " & "</B>" & Err.Description & "<P>"
Response.Write "<B>" & "Help Context: " & "</B>" & Err.HelpContext & "<P>"
Response.Write "<B>" & "Help Path: " & "</B>" & Err.HelpPath & "<P>"
Response.Write "<B>" & "Native Error: " & "</B>" & Err.NativeError & "<P>"
Response.Write "<B>" & "Source: " & "</B>" & Err.Source & "<P>"
Response.Write "<B>" & "SQL State: " & "</B>" & Err.SQLState & "<P>"
End If
IF Conn.Errors.Count > 0 Then
Response.Write "<FONT SIZE=5><B>" & "Database Errors:" & "</B></FONT><P>"
Response.Write "<B>" & "SQL Expression: " & "</B>" & SQL & "<P>"
For counter= 0 To Conn.Errors.Count
Response.Write "<B>" & "Error Number: " & "</B>" & Conn.Errors(Counter).Number & "<P>"
Response.Write "<B>" & "Error Descr: " & "</B>" & Conn.Errors(Counter).Description & "<P>"
Next
Else
<< rest of code >>
End If
<!-- START: DEBUGGER UTILITY -->
<style type="text/css">
.Debugger {
font-family: Verdana,sans-serif;
font-size: 12px;
font-weight: normal;
}
.h2Debugger {
font-family: Verdana,sans-serif;
font-size: 18px;
font-weight: bold;
}
.h3Debugger {
font-family: Verdana,sans-serif;
font-size: 14px;
font-weight: bold;
}
</style>
<table border="1" bgcolor="#FFCC66" width="100%"><tr><td class="Debugger">
<center><h2 class="h2Debugger">Debugger Utility</h2></center>
<h3 class="h3Debugger"> Application Variable Collection </h3>
<%
On Error Resume Next
For Each Item in Application.Contents
Response.Write Item & " = " & Application.Contents(Item) & "<BR>"
For Each ItemKey in Application.Contents(Item)
Response.Write "Sub Item: " & Item & " (" & ItemKey & ") : " & Application.Contents(Item)(ItemKey) & "<br>"
Next
Next ' Key
%>
<h3 class="h3Debugger"> Session Variable Collection </h3>
<%
On Error Resume Next
For Each Item in Session.Contents
Response.write Item & " = " & Session.Contents(Item) & "<BR>"
For Each ItemKey in Session.Contents(Item)
Response.Write "Sub Item: " & Item & " (" & ItemKey & ") : " & Session.Contents(Item)(ItemKey) & "<br>"
Next
Next
%>
<h3 class="h3Debugger"> QueryString Collection </h3>
<%
On Error Resume Next
For Each Item in Request.QueryString
For iCount = 1 to Request.QueryString(Item).Count
Response.Write Item & " = " & Request.QueryString(Item)(iCount) & "<br>"
Next
Next
%>
<h3 class="h3Debugger"> Form Collection </h3>
<%
On Error Resume Next
For Each Item in Request.Form
For iCount = 1 to Request.Form(Item).Count
Response.Write Item & " = " & Request.Form(Item)(iCount) & "<br>"
Next
Next
%>
<h3 class="h3Debugger"> Cookies Collection </h3>
<%
On Error Resume Next
For Each Item in Request.Cookies
If Request.Cookies(Item).HasKeys Then
'use another For...Each to iterate all keys of dictionary
For Each ItemKey in Request.Cookies(Item)
Response.Write "Sub Item: " & Item & "(" & ItemKey & ")"
Response.Write " = " & Request.Cookies(Item)(ItemKey)
Next
Else
'Print out the cookie string as normal
Response.Write Item & " = " & Request.Cookies(Item) & "<br>"
End If
Next
%>
<h3 class="h3Debugger"> ClientCertificate Collection </h3>
<%
On Error Resume Next
For Each Item in Request.ClientCertificate
For iCount = 1 to Request.ClientCertificate(Item).Count
Response.Write Item & " = " & Request.ClientCertificate(Item)(iCount) & "<br>"
Next
Next
%>
<h3 class="h3Debugger"> ServerVariables Collection </h3>
<%
On Error Resume Next
For Each Item in Request.ServerVariables
For iCount = 1 to Request.ServerVariables(Item).Count
Response.Write Item & " = " & Request.ServerVariables(Item)(iCount) & "<br>"
Next
Next
%>
</td></tr>
</table>
<!-- END: DEBUGGER UTILITY -->