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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error trapping in your asp code

Status
Not open for further replies.

SimonPG

Vendor
Sep 1, 2003
1
GB
Could anyone show me or point me in the direction of how to implement error trapping into your asp code I want to catch error concerned with my database connection. But when I say

Code:
on error resume next

if err.number <> 0 then
   'goto another page
end if

it just passes over then the if statement as if it is not there
any ideas

thanks in advance
Simon
 
well, for when you can read this again ..

1. javascript has better (in my opinion) error trapping (nested try/catch)
2. depending on your script engine and or ADO version, you may need to check the Connection.Errors collection for ADO errors (or even better, just get the free latest version of script engine and ADO) codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top