473,836 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject.
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.CreateOb ject it
works fine.

Please help!
Nithi Gurusamy
Jul 19 '05 #1
2 2421
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.CreateOb ject?

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.c om> wrote in message
news:uy******** *****@tk2msftng p13.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.CreateOb ject. 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.CreateOb ject 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.c om> wrote in message
news:uy******** *****@tk2msftng p13.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.CreateOb ject. 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.CreateOb ject 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
1225
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 Explorer: If I force a 500 error, I get the custom page AS LONG AS THE VBScript CODE isn't longer than about 165 characters (but it won't send me an email). If the VBScript exceeds 165 characters, then the whole code of the error page is revealed.
4
9451
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 Err.Number = 2501 Then Exit Sub
13
4494
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 runs into problems on the system where it will actually be used, and since I used so little error-trapping it dies very ungracefully. I will of course try to fix whatever is causing the error and add error-trapping to the functions where the...
3
1372
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 not want this ugly thing to display, what am i missing from the code below? am i not catching that exception and displaying my own error message? so why is the other one coming up after mine public bool isInteger(string str int i=0 bool...
1
986
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 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...
6
1486
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" defaultRedirect="WebForm1.aspx"> <error statusCode="404" redirect="ServerError.aspx"></error> <error statusCode="500" redirect="WebForm3.aspx"></error>
4
6451
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 happens. What do I need to do to trap and give the ability to save changes before the window closes? Thanks, Ron
9
2113
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 | E_PARSE); set_error_handler("SendErrorReport"); function SendErrorReport($errorNumber, $errorMessage, $errorFile, $errorLine, $vars) {
1
1282
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 best site for learning ASP. So i am learning from that.
0
9820
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10548
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10591
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9374
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7792
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3115
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.