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

Home -> Community -> Usenet -> c.d.o.server -> Question on use of triggers to call functions

Question on use of triggers to call functions

From: <elizabeth_yuen_at_my-deja.com>
Date: 2000/02/29
Message-ID: <89hgi6$f8l$1@nnrp1.deja.com>#1/1

Hi,

Here's the problem I'm having:

I have a row-level trigger (tr_1) which is designed to pass parameters to a function (func_main). The func_main is designed to pass similar parameters to another function (either func_A or func_B). It passes parameters to either func_A or func_B depending on parameters which are passed by the trigger to func_main.

Trigger (tr_1) (parameters passes XYZ or ABC) |
|-->Function (func_main) (evaluates parameters)

    |

|-->Function (func_A) (do for XYZ only)
|-->Function (func_B) (do for ABC only)

(func_A and func_B will return a value back to func_main so that it can finish processing)

When the trigger fires, the func_main appears to be called sucessfully, initially. But does not complete because it fails to calling either func_A or func_B.

I ran the func_main with the parameters I expect to pass by the trigger and it runs fine (goes through to either func_A or func_B and returns processing to func_main as designed). This is the case when I execute func_main directly.

It is not successful when I'm using the trigger to pass the same paramters.

(func_main, func_A, func_B is currently designed with a return value of 0 or -1. However, the trigger (tr_A) calling func_main is not actually using the return value, it is just being assigned to a variable in the trigger (tr_A).

ie. (statement in trigger - tr_A)
v_func_value := ccex.func_creditsummary_calc (param_A, param_B, param_C, param_D, param_E);

Any ideas? Is the design feasible in Oracle?

Thanks in advance to anyone who can help.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Feb 29 2000 - 00:00:00 CST

Original text of this message

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