Error handling in 3 tiers
With an ASP front end, a VB COM middle and a SQL Server data layer, I am
wondering about the error handling.
I want to raise errors in SQL Server 7, evidently need severity of between
11 and 16 for VB to handle, then have error handling in VB Com object and
then ASP error handling. I want to be sure that the error messages get back
to the user, does anyone have a good reference for this to help sort this
out some? Thanks,
Scott
slbrook@hotmail.com
Re: Error handling in 3 tiers
One solution would be to use a disconnected(ADOR) recordset. Create a new
recordset defining the "shape" you want your errors to take (Column names,
data types etc). Create this on the client side and pass the recordset(byref)
to each server component. In the errorhandler of your server components add
a record to the recordset with the error details(could be VB, ADO or custom
defined errors) and when the call returns to the client you have to check
if there are records in the recordset. If there are display them. One thing
to watch out for is to reset the error recordset to nothing after handling
your errors. ASP also works well with dealing with ADO recordsets so it shoudl
be quite straight forward. You might want to think of an Error handling object
to manipulate your error recordset
"Scott Brookhart" <sbrook@inetport.com> wrote:
>With an ASP front end, a VB COM middle and a SQL Server data layer, I am
>wondering about the error handling.
> I want to raise errors in SQL Server 7, evidently need severity of between
>11 and 16 for VB to handle, then have error handling in VB Com object and
>then ASP error handling. I want to be sure that the error messages get back
>to the user, does anyone have a good reference for this to help sort this
>out some? Thanks,
> Scott
> slbrook@hotmail.com
>
>
>
>
>
Re: Error handling in 3 tiers
Enterpise Application Architecture by Wrox press has good examples on this.
Paul F <pfarnan@informationmosaic.com> wrote in message
news:38eb065d$1@news.devx.com...
>
> One solution would be to use a disconnected(ADOR) recordset. Create a new
> recordset defining the "shape" you want your errors to take (Column names,
> data types etc). Create this on the client side and pass the
recordset(byref)
> to each server component. In the errorhandler of your server components
add
> a record to the recordset with the error details(could be VB, ADO or
custom
> defined errors) and when the call returns to the client you have to check
> if there are records in the recordset. If there are display them. One
thing
> to watch out for is to reset the error recordset to nothing after handling
> your errors. ASP also works well with dealing with ADO recordsets so it
shoudl
> be quite straight forward. You might want to think of an Error handling
object
> to manipulate your error recordset
>
> "Scott Brookhart" <sbrook@inetport.com> wrote:
> >With an ASP front end, a VB COM middle and a SQL Server data layer, I am
> >wondering about the error handling.
> > I want to raise errors in SQL Server 7, evidently need severity of
between
> >11 and 16 for VB to handle, then have error handling in VB Com object and
> >then ASP error handling. I want to be sure that the error messages get
back
> >to the user, does anyone have a good reference for this to help sort this
> >out some? Thanks,
> > Scott
> > slbrook@hotmail.com
> >
> >
> >
> >
> >
>