• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

Trapping the asp 0113 error

How can I trap the 'ASP 0113 Script timed out' error in asp code, as the Err.Number is comming back as 0 even when the script times out. My code is as follows:

on error resume next
Set RSOrdersTable = OBJdbConnection.Execute(SQLQuery)
errno = Err.Number
errmsg = Err.Description
on error goto 0
if errno<>0 then
  response.redirect("dberror.asp?errmsg=" &   server.urlencode(errmsg) & "&process=" & Server.URLEncode("Retrieving List of Orders"))
else
  .....display orders etc...
end if
0
sharon_brindley
Asked:
sharon_brindley
  • 2
1 Solution
 
jitgangulyCommented:
Take off on error goto 0 and try
0
 
fritz_the_blankCommented:
You will need to change the connection name for the second part of this to match your connection name, but:

'VBScript errors
If Err.Number > 0 Then
    Response.write("<p><hr>The following VB Errors Occured<p>")
     Response.write("Error Number: " & Err.number & "<br>")
     Response.write("Error Source: " & Err.source & "<br>")
     Response.write("Error Description: " & Err.description & "<br>")
End If

'Connection errors
dim iCounter
if objConnection.Errors.count > 0 then
    Response.write("<p><hr>The following Connection Errors Occured<p>")
    for iCounter = 0 To objConnection.Errors.Count - 1
          Response.write("Error Number: " & objConnection.errors(iCounter).number & "<br>")
          Response.write("Error Description: " & objConnection.errors(iCounter).description & "<br>")
          Response.write("SQL State: " & objConnection.errors(iCounter).SQLState & "<br>")
          Response.write("Native Error: " & objConnection.errors(iCounter).NativeError & "<br>")
    next
end if
0
 
sharon_brindleyAuthor Commented:
This didn't solve the problem, I found the answer on the Microsoft Knowledge Base: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q182036

But I'll give you the points anyway because you taught me something I didn't know which has come in useful for another problem!
Thanks
0
 
fritz_the_blankCommented:
Thank you Sharon.

Fritz the Blank
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now