Reputation: 17
in oracle form builder my form does not access trigger named WNFI i call it on when- new- form-instance like this
execute_trigger('WNFI') ;
it doesn't enter it at all what is the problem ?
Upvotes: 0
Views: 197
Reputation: 143063
Which Forms version do you use?
I've just tried it on Forms 10g, and it works OK - trigger is called and does its job (in my test, displays a message).
Anyway, just in case you didn't understand what APC says: move code from the WNFI trigger into a procedure (not a stored procedure, in the database; create it under the Program units node in the Object Navigator). For example:
-- This is P_WNFI procedure; this code was previously in WNFI trigger
message('wnfi');
message('wnfi');
Modify WHEN-NEW-FORM-INSTANCE
trigger:
-- instead of
-- execute_trigger('WNFI');
-- use
p_wnfi;
If you open Forms Online Help system and search for execute_trigger
, you'll see a note:
EXECUTE_TRIGGER
is not the preferred method for executing a user-named trigger. Writing a user-named subprogram is the preferred method.
If I were you, I'd do as told. execute_trigger
might be here for backward compatibility for some time, but not forever. Who knows; maybe Oracle corp. does.
Upvotes: 1