At the top of your code have on error resume next, then have a file with your error routines in and save it in a file in the include directory, then include it in all your asp pages. After each call to a database command (i.e. connect to database. read recordset) use the err object.

So at the top of your asp page....
<%@ Language=VBScript %>
<%option explicit%>
<%On Error Resume Next %>
<!--#include virtual="/include/ErrorHandler.asp"-->

Then in the code

<%set conn = server.CreateObject("webisis.DBwebConnection") %>
<%if Err.number <> 0 then%>
<%TrapError Err.description%>
<%end if%>

Where TrapError is a sub in the errorhandler

Then at the bottom after the </HTML>
<%ProcessErrors%>

Again ProcessErrors is a sub in the errorhandler