By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,190 Members | 2,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,190 IT Pros & Developers. It's quick & easy.

custom asp/sql error message on missing sql table/field

100+
P: 120
hi guys

is it possible to have a custom asp/sql error message on a missing sql table/field?
error msg e.g

Microsoft OLE DB Provider for SQL Server error '80040e37'
Invalid object name 'Hotel_Prices_2010'.
/.../...//...../....hiddenurl/etc//default.asp, line 101

at the moment if there was a typo error in my code for a sql table or a sql field etc then the front end asp page errors - I just want a failsafe around this..

thanks in advance
Omar.
Sep 18 '10 #1
Share this Question
Share on Google+
3 Replies


jhardman
Expert 2.5K+
P: 3,405
yes, in IIS you can specify which page is returned for each error code. right click on your website, select properties, and look for "custom error codes"

Jared
Sep 20 '10 #2

jhardman
Expert 2.5K+
P: 3,405
you can also put error handlers right in the page:[code]
'before section that might generate error
on error resume next
'after section that might throw error
if err.number > 0 then
response.write err.number
end if[code]Jared
Sep 20 '10 #3

100+
P: 120
thanks for the help guys

I will give this a try
Omar.
Sep 29 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.