Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Executing a trigger using code?

Posted on 2001-08-09
7
2,133 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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 Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

829 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