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 -> Re: How to Execute a Trigger?

Re: How to Execute a Trigger?

From: Chris Hamilton <ToneCzar_at_erols.com>
Date: Tue, 29 Jun 1999 17:42:26 GMT
Message-ID: <37790525.20819777@news.erols.com>


On Tue, 29 Jun 1999 17:02:35 GMT,
laleonard_SpamBanana_AT_mindspring.com <laleonard_at_mindspring.com> wrote:

>A novice question: I have a "After Update" trigger on a column of a
>table. I am writing a C++ program, and I want to make this trigger
>fire.
>
>I know that I can make the trigger fire by simply writing to that
>column in that table, but is a more direct approach? I'm looking for
>something like:
>
> ::SQLExecDirect("EXECUTE TRIGGER MyTrigger");

The easiest way would be to put your code into a stored procedure, then simply have the trigger call it. That way, you could also call the program manually.

If the procedure was called MY_PROC, for instance and took an input variable of ID_NUM_IN, you could call it thus:

SQL> exec my_proc(id_num_in=>44);

Chris



Christopher Hamilton
Oracle DBA -- Wall Street Sports
chris_at_wallstreetsports.com
http://www.wallstreetsports.com/ Received on Tue Jun 29 1999 - 12:42:26 CDT

Original text of this message

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