Trapping as ASPError in ASP 3.0 Raised from my own COM object

N

Nithi Gurusamy

Dear Group:

I have a COM object developed in VB. It makes ADODB calls. When it fails it
Raise Error. I am using the COM object in my ASP using Server.CreateObject.
Whenever a function call fails I wanted the system to catch the 500-100
error and redirect to the configured page in IIS. But nothing happens. I
don't have "on error resume next" in my COM object.

If I create ADO objects directly in my ASP code using Server.CreateObject it
works fine.

Please help!
Nithi Gurusamy
 
N

Nithi Gurusamy

Let me explain the problem in detail:

If I raise an error in my COM object method, is there a way to trap it in my
ASP code where I created the COM object using Server.CreateObject?

My COM object is working with ADO objects. When there is an error thrown by
an ADO object, I want to raise the same error back to the caller of this COM
object. The caller is my ASP code. I want the "500-100" custom error handler
to be called at the end.

The COM object is developed using VB. Even I tried by removing the "on
error.." error handlers in the COM object code. Nothing works. Only way to
realize the error in the ASP is to pass an errorcode variable by reference
and check it back after the function call returns. If there is an error call
Err.Raise method so that it triggers the "500-100" error handler. But I want
everything to happen automatically. I don't want to call Err.Raise in my ASP
code. I can call Err.Raise inside the COM object.

I hope this is a simple issue. Could never find a similar posting in the
past.

Please help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top