Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to Execute a Trigger?
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