Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

on Error GoTo... 1

Status
Not open for further replies.

xue

Programmer
Feb 5, 2001
12
0
0
US
I have a statement like
On Error GoTo CheckError
....

CheckError:
....

but it is giving me the syntax error on this one, can anyone help? I use it on ASP/vbscript

 
you can't error check in VBScript like you can in VB.
error handling is like so:

On Error Resume Next

...

then, after your connection calls or anything else that you think could raise an error, you write

if Err.number <> 0 then
Response.write &quot;There was an error&quot;
Err.clear
End if

yes - the VBScript implementation of error handling is horrible at best.

hope this helps.
 
Thank you very much. I think that is very helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top