473,993 Members | 3,669 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
Nov 17 '05 #1
1 991
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1238
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.
2
2429
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...
8
3386
by: Pete | last post by:
I'm trying to improve my code so that when I open a recordset object, I can absolutely guarantee it is closed and is set = Nothing. I have read some old threads and they all say to use the functional equivalent of the following code: Public Sub CloseRecordset() On Error GoTo Sub_Error Dim rs As Recordset rs.FindFirst "This Will Error"
4
9470
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
4511
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
1377
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...
6
1494
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
6465
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
2121
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
1287
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
10411
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
10229
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11495
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...
0
10998
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...
1
8554
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
6508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3843
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.