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
Solved

Trapping the asp 0113 error

Posted on 2002-04-18
4
374 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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