how to trap an ado timeout

Results 1 to 2 of 2

Thread: how to trap an ado timeout

  1. #1
    Join Date
    Dec 1969

    Default how to trap an ado timeout

    I have a web page using vbscript to access a database and occasionally that database is going to time out while I'm trying to get a result set in my web page. It happens only one day a month, and I'd like to trap the timeout so I could return the user to a nice web page with an appropriate error message, is there some way to do that? Thanks Bostonrose

  2. #2
    Join Date
    Dec 1969

    Default Should be able to use...

    ...ON ERROR RESUME NEXT.<BR><BR>But use it properly:<BR><BR>&#060;%<BR>...lots of code...<BR><BR>Set rs = Nothing &#039; or something like this<BR>On Error Resume Next<BR>Set rs = yourConnection.Execute( yourSQL )<BR>On Error GoTo 0<BR>If rs Is Nothing Then<BR> Response.Write "something went wrong"<BR>End If<BR>...<BR>%&#062;<BR><BR>Only leave the RESUME NEXT active for one or two VBS statements. Don&#039;t just turn it on for the entire page.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts