Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: catching raise_application_error from within a trigger with ADO

Re: catching raise_application_error from within a trigger with ADO

From: Frank <fbortel_at_nescape.net>
Date: Sun, 16 Nov 2003 14:27:39 +0100
Message-ID: <bp7th1$7nb$1@news3.tilbu1.nb.home.nl>


news wrote:

> Hi,
> I am using the latest oracle oledb Provider (9.2.0.2) to access a database
> (9.2.0.1) on which triggers whatch the insertion and update of records. My
> client is written in visual c++ 6.0 using ADO 2.7. The Triggers on the
> database call raise_application_error to rollback the unauthorized
> operation. Everything goes well except that the oracle oledb provider throws
> the exception (COleDispatch) with the correct error code and message against
> the winproc part of my client application instead of throwing it against the
> call to ADO. The effect is that when the call fails due to failing of the
> trigger the execution of the client is directly continued in the
> CWinapp::ProcessWinprocException. The application ends after the exception
> even when it is caught.
> I am unable to catch the exception at the call to ADO. Has anyone discovered
> this problem? Has anyone any suggestion how to go arround this behaviour?
> The Problem doesn't occur when the Microsoft Provider for oracle is used,
> but there are other reasons why we can't use that provider.
> Many thanks
> Heiko
>
>

raise application_error is something like 'drop on the floor and freeze'.
If you want some what user friendly error handling, consider a simple raise, and handle the error in the calling block.

Read up on exception handling, as it is confusing to a lot of people.

-- 
Regards, Frank van Bortel
Received on Sun Nov 16 2003 - 07:27:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US