Is there any way we can prevent the CALLER (it could be a ADODB.Command or from ASP page) FROM SEEING THE ERROR if there is an error generated from SQL Server?
I was thinking about this earlier, but was reluctant to answer because I didn't feel I understood the question. But, below is a (abbreviated) example of something I do all the time in ASP. You can see that I am testing the number of errors on the
connection object conn; if I see errors, I do one thing; no errors I do another. (A duplicate PK on an Insert is an example of something that would generate an error on the conn object.)
So, I suppose we can say I am controlling how/what the client sees after an error, and perhaps this illustrates what kim1 is asking. (I'm still not sure. If you don't find this helps at all, please, please ignore)
[tt]
------------------------------
<%
objCmd.CommandText = "dbo.sprInsertHeader"
objCmd.CommandType = adCmdStoredProc
On Error Resume Next
objCmd.Execute
totalErrors = conn.Errors.Count
If totalErrors <> 0 Then%>
<!-- #INCLUDE FILE="fatalerror.asp" -->
<%Else
theRowCount = objCmd.Parameters("RC"

.Value
If theRowCount = 1 Then
Response.redirect(gotoUrl & theTrans)
Else
Response.redirect("weird.asp"

End If
End If%>
-------------------------
[/tt]