Solved

Executing a trigger using code?

Posted on 2001-08-09
7
2,156 Views
Last Modified: 2007-12-19
I have an Edit button, and I want to execute the WHEN-BUTTON-PRESSED trigger from another object on the screen.  Is that a command that will enable me to run that trigger?

To be more precise, I have a textbox on the screen, and when the user double-clicks the textbox, I want to run the code in the button's WHEN-BUTTON-PRESSED trigger.

Thanks,
Brian
0
Comment
Question by:bek
7 Comments
 
LVL 3

Expert Comment

by:p_yaroslav
ID: 6368284
Hello!

May br better create event ON-DOUBLE-CLICK???

Yaroslav.
0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 6368380
Move the code you want executed from the when-button-pressed trigger to a new program_unit in the form.  Then from the when-button-pressed trigger simply run the program_unit.  Also, create a when-mouse-double-click trigger in that text item that runs the same program unit.
0
 
LVL 48

Expert Comment

by:schwertner
ID: 6368413
Use EXECUTE_TRIGGER built-in to execute that trigger in When-Mouse-DoubleClick Trigger.

A better solution is to embed the code invoking the editor in a program unit belonging to the form and invoking this program unit (procedure) in both places.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Accepted Solution

by:
santoshmathew earned 50 total points
ID: 6368621
Hi,

You can use the built in Execute_trigger('Tigger-name') to do this.

You can write  Execute_trigger(When-Button-Pressed');

in another trigger/Program Unit to execute the When-Button-Pressed trigger.

Cheers.
0
 
LVL 2

Expert Comment

by:santoshmathew
ID: 6368634
Sorry, looks like Schwertner and I was typing were typing at the same time.
0
 

Author Comment

by:bek
ID: 6368752
I took markgeer's advice and put the code in a program unit.  How do I run a program unit?

(Thanks for the help, guys.  I guess it's obvious I'm new to Oracle.)
0
 

Author Comment

by:bek
ID: 6368794
Thanks to everyone.  I awarded the points to the answer that seemed the most straightforward (santoshmathew), but I appreciate everyone's response!

I am getting ready to ask another question about an Oracle trigger I can't seem to find.  It's the equivalent of Microsoft's "Interactive Change Event", for those of you with VB experience.  Watch for my question, coming up immediately!

Thanks,
Brian
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Include a logo in email body using Oracle utl_mail 11 52
Procedure syntax 5 48
minium over 4 numeric columns for each row in oracle 2 36
error doing substr 3 33
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question