Or try this understable reply. :| This particular code is meant for
displaying error data in a custom error page, but it'll give you info on
getting error information.
Dim aErrorInfo(1,13)
Dim oError
Set oError = Server.GetLastError
aErrorInfo(0,0) = "ASP Code" : aErrorInfo(1,0) = oError.ASPCode
aErrorInfo(0,1) = "ASP Description" : aErrorInfo(1,1) =
oError.ASPDescription
aErrorInfo(0,2) = "Description" : aErrorInfo(1,2) = oError.Description
aErrorInfo(0,3) = "Category" : aErrorInfo(1,3) = oError.Category
aErrorInfo(0,4) = "Number" : aErrorInfo(1,4) = oError.Number
aErrorInfo(0,5) = "Source" : aErrorInfo(1,5) = oError.Source
aErrorInfo(0,6) = "File" : aErrorInfo(1,6) = oError.File
aErrorInfo(0,7) = "Line" : aErrorInfo(1,7) = oError.Line
aErrorInfo(0,8) = "Querystring" : aErrorInfo(1,8) = Request.Querystring
On Error Resume Next
aErrorInfo(0,9) = "Form Data" : aErrorInfo(1,9) = Request.Form
If Err.Number <> 0 Then aErrorInfo(0,9) = "(binary data)"
On Error Goto 0
aErrorInfo(0,10) = "All HTTP" : aErrorInfo(1,10) = "<textarea
style=""width: 410px; height=100px; font: 8pt verdana;"">" &
Request.ServerVariables("ALL_HTTP") & "</textarea>"
aErrorInfo(0,11) = "Remote Address" : aErrorInfo(1,11) =
Request.ServerVariables("REMOTE_ADDR")
aErrorInfo(0,12) = "Description" : aErrorInfo(1,12) =
Request.ServerVariables("REMOTE_HOST")
aErrorInfo(0,13) = "Request Date" : aErrorInfo(1,13) = FormatDateTime(Now,
1) & " " & FormatDateTime(Now, 3)
Ray at work
"John ." <jr****@yahoo.com> wrote in message
news:eY***************@TK2MSFTNGP09.phx.gbl...
I have an error handling routine that emails me the Err.Source, Err.Nbr,
and Err.Description in the event of an error. How can I include the
line number of the error as well and the filename?
*** Sent via Developersdex http://www.developersdex.com ***