Solved

Trapping the asp 0113 error

Posted on 2002-04-18
4
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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