Solved

Trapping the asp 0113 error

Posted on 2002-04-18
4
369 Views
Last Modified: 2008-02-01
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
Comment
Question by:sharon_brindley
  • 2
4 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6951027
Take off on error goto 0 and try
0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 50 total points
ID: 6951058
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
 

Author Comment

by:sharon_brindley
ID: 6952932
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
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 6953318
Thank you Sharon.

Fritz the Blank
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now