Home » Developer & Programmer » Forms » All V2-style triggers (10g)
All V2-style triggers [message #291139] Thu, 03 January 2008 02:28 Go to next message
Qaiser.Bashir
Messages: 32
Registered: July 2007
Location: Rawalpindi
Member

Dear Fellows,
First of all Happy New Year to every one on this forum.
i want to migrate my form 6i fmb's to 10g fmb's. but in the help i study that all the V2 Style triggers are obseleted from 10g.can any body tell me that what these triggers are..means can some body tell me the names of the V2 style triggers.


Thanks and regards
Qaiser Bashir
Re: All V2-style triggers [message #291256 is a reply to message #291139] Thu, 03 January 2008 09:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
V2-style triggers are as ancient as dinosaurs; SQL*Forms 3.0 used "modern" PL/SQL-style triggers. As you use Forms 6.0, I sincerely doubt that V2 triggers can even be found in there.

The last version which allowed developers to create V2 triggers was 4.5. In 5.0 you could edit them, but not create new ones. In 6.0, it isn't possible to create, edit, not even view V2 triggers, which made them obsolete in 6.0 already. Forms 10g don't even remember V2 triggers ever existed, so ... don't worry, there is a high possibility that you'll never see V2 triggers in your life.

P.S. What are these V2 triggers? They were written in steps. The closest analogy with triggers you know might be this: every statement of a "modern" trigger was one step in V2 triggers. For example, a trigger like this one
BEGIN
  NULL;
END;
had three steps in a V2 trigger: first step was BEGIN, the second one NULL, and the final step was END.
Re: All V2-style triggers [message #291322 is a reply to message #291256] Thu, 03 January 2008 21:52 Go to previous messageGo to next message
Qaiser.Bashir
Messages: 32
Registered: July 2007
Location: Rawalpindi
Member

Thank you very much dear
as i unerstand from your reply is that V2 style triggers r those which r not built in triggers such as when_Button_Pressed ...these r those triggers which were developed by the user according to its requirements...r in other words manual creation of triggers were the V2 style of triggers......as we rename any trigger and used it for our own purpose....if this is wrong then plz can u post me some example of V2 style triggers.............

Regards
Qaiser Bashir
Re: All V2-style triggers [message #291370 is a reply to message #291322] Fri, 04 January 2008 00:41 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
V2 trigger names looked like the ones you know (such as KEY-NXTFLD, POST-QUERY etc.). Of course, there weren't as many of them as nowadays - all "GUI-oriented" triggers didn't exist (such as WHEN-BUTTON-PRESSED).

I'm sorry, but I can't post an example at the moment as I don't have any of the old forms here. Will try to find one next week and post a screenshot or even an INP file so that you could see it yourself. INP can be viewed by any text editor, or - if you have an installation of SQL*Forms 3.0 (or earlier), you'll be even able to open it.
Re: All V2-style triggers [message #291378 is a reply to message #291370] Fri, 04 January 2008 01:04 Go to previous messageGo to next message
Qaiser.Bashir
Messages: 32
Registered: July 2007
Location: Rawalpindi
Member

Dear Once again Thank you very much
I shall wait for your reply...


Regards
Qaiser Bashir
Re: All V2-style triggers [message #292269 is a reply to message #291378] Tue, 08 January 2008 06:23 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, here it is; as INP files are editable, this is how one of V2 style triggers looks like:
         DEFINE TRIGGER

            NAME = KEY_NXTFLD
            TRIGGER_TYPE = V2

            DEFINE STEP

               TEXT = <<<
               #exemacro case b2.br_ceka is when '' then
               message 'Unesite broj ceka...'; endtrig;
               when others then
               copy b1.mat_br into b2.mat_br; copy b1.datum_knj into b2.datum_knj;
               copy b1.iznos into b2.iznos; copy b1.pos into b2.poslovnica;
               end case;
               >>>

            ENDDEFINE STEP

            DEFINE STEP

               TEXT = <<<
               select max(rb), max(rb) into :b1.rb, :b2.rb from stp1151
               where mat_br = :b1.mat_br
               and datum_knj = :b1.datum_knj
               and iznos_hrd = :b1.iznos
               >>>

            ENDDEFINE STEP

            DEFINE STEP

               TEXT = <<<
               #exemacro nxtfld;
               >>>

            ENDDEFINE STEP

         ENDDEFINE TRIGGER

Here is a screenshot of how the "Trigger Definition Editor" looked like in SQL*Forms 3.0

/forum/fa/3706/0/

This is how one of the steps from the previous trigger looks like in SQL*Forms

/forum/fa/3707/0/

I hope that now you have a clearer idea of V2-style triggers.
  • Attachment: v2_trg_1.PNG
    (Size: 7.20KB, Downloaded 1827 times)
  • Attachment: v2_trg_2.PNG
    (Size: 16.40KB, Downloaded 1865 times)
Previous Topic: Master Details Relationship
Next Topic: Help Required Regarding email notification from a form
Goto Forum:
  


Current Time: Sun Feb 09 21:28:48 CST 2025