3 Replies Latest reply: Jul 22, 2013 5:45 AM by MST RSS

    Same Procedure in multiple attached libraires

    MST

      Dear All,

       

      I have multiple attached libraries in my form.

      Same procedure contain in multiple attached libraries.

      Then which library procedure will fire.

      What is the sequenc of firing.

        • 1. Re: Same Procedure in multiple attached libraires
          MST

          Please do the needful.

          • 2. Re: Same Procedure in multiple attached libraires
            CraigB

            MST wrote:

             

            I have multiple attached libraries in my form.

            Same procedure contain in multiple attached libraries.

            Then which library procedure will fire.

            What is the sequenc of firing.

            If I understand you correctly, your form has more than one attached library and your attached libraries each have a procedure with the same name and you want to know which instance of the procedure will execute when you call the procedure from your form.

             

            First, if this is the case, then I have to say that this is extreamly poor design.  You should refactor your libraries so that they each have a unique procedure name.  Do these procedures all perform the same function?

             

            Second, to answer your question - "What is the sequence of firing" - Forms is hierarchical.  This means that Forms will fire the first instance of the procedure that it finds in the Object Navigator.  For example, if you have 3 attached libraries (named: library_a, library_b, library_c) and each library has a procedure called SHOW_ME and the libraries are attached in the following order in the Attached Libraries node of the Object Navigator:

            1. LIBRARY_B
            2. LIBRARY_A
            3. LIBRARY_C

             

            When you call the SHOW_ME procedure Forms will search the object navigator (starting with the Program Units node, then moving to the Attached Libraries node) to look for SHOW_ME procedure.  Since LIBRARY_B is listed before LIBRARY_A or _C, forms will execute the instance of SHOW_ME found in the LIBRARY_B attached library.

             

            Now, just to make things fun, if you had an instance of the SHOW_ME procedure in the Program Units node (in order words a local copy of the SHOW_ME procedure) then Forms would execute this procedure and not the one in the attached library.  Lastly, if Forms did not find the SHOW_ME procedure in the Program Units or Attached Libraries nodes Forms will then go to the database to see if the procedue exists in the database.

             

            Lastly, let me reinterate the first point I made.  Having a procedure in multiple libraries with the same name is a bad design and should be avoided at all costs.

             

            Hope this helps,

            Craig...

            • 3. Re: Same Procedure in multiple attached libraires
              MST

              Dear Craig,

               

              Thanks for reply.

              I will check and confirm.

               

              Please resolve one more issue.Below is the link.I raised this issue long back. Till now not resolved.

              https://forums.oracle.com/thread/2547833?stqc=true