473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 2398
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: M_Evans | last post by:
I'm attempting to use the ASPError object to generate a custom page when a user encounters a 500-error. I want the page to generate an email to alert my department of the problem. In Internet...
4
by: Keith | last post by:
I have the following code in the On No Data event of a report: **** On Error GoTo err_trap MsgBox "No items matching criteria.", vbInformation, gcApplication Cancel = True err_trap: If...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
3
by: CSharpX | last post by:
I have the following code and when the exception is raised the OS displays a nasty Stop dialog box it says an unhandled exception occured, gives 3 buttons to click details, contintue Quit... i do...
1
by: Nithi Gurusamy | last post by:
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...
6
by: SMG | last post by:
Hi , Sory for incomplete message in last post here is the actual problem.. I am using following code in web.confiig for trapping all the error through out my site.. <customErrors mode="On"...
4
by: RSH | last post by:
I am trying to figure out how I can trap the Closing Event that occurs when a user attempts to close the window by clicking on the red"X". I tried this code which I found online but nothing...
9
by: 47computers | last post by:
Pretty new to PHP, I recently started learning about error trapping. As of right now, I include the following into a page in my website: -------BEGIN PASTE-------- error_reporting(E_ERROR |...
1
by: G | last post by:
Hello Guys, I am new to ASP. I am learning one by one object. but when coming to ASPError object. how to use this object. I am not understanding. one of my friend suggested w3schoools.com is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.