469,603 Members | 2,121 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

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

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
Jul 19 '05 #1
2 2245
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!
"Nithi Gurusamy" <ni****@yahoo.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
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

Jul 19 '05 #2
This error is produced by Internet Explorer, you have to do the following to
obtain the error correct.

Tools->Internet Options->Advanced

And Un-Checking "Show friendly HTTP error messages"

After, run the page and watch the error.
Sorry for my English!!!!.
--
Saludos,
Jhonny Vargas P. [MS MVP]
Santiago de Chile

"Nithi Gurusamy" <ni****@yahoo.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
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

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by M_Evans | last post: by
4 posts views Thread by Keith | last post: by
13 posts views Thread by Thelma Lubkin | last post: by
6 posts views Thread by SMG | last post: by
9 posts views Thread by 47computers | last post: by
1 post views Thread by G | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.