Solved

Executing a trigger using code?

Posted on 2001-08-09
7
2,183 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
[X]
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
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

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!

Question has a verified solution.

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

Suggested Solutions

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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
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.

751 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