8 Replies Latest reply on Mar 9, 2017 10:03 AM by dkampf

    Forms 12c: Unexpected fragile external reference -- PL/SQL Error 801

    Steve Cosner

      Is this a known bug?  I can't find any mention of it.

       

      I have a cursor defined in a package specification in my form.

      I access the cursor from a procedure in the form.

      The Forms 12c compiler fails to compile the procedure, giving this error:

      PL/SQL ERROR 801 at line 0, column 0

      internal error [Unexpected fragile external reference.]

       

      This form compiles (AND runs) in Forms 6, Forms 10, and Forms 11.

       

      I've created the simplest form to demonstrate.  My actual form is far more complex, and it has a single cursor in the package specification that is used in several program units.  As in the hundreds of forms here, we have a package specification used to hold all common variables and values that are used throughout the form by their dozens of processing procedures and triggers.  The package spec often does not have an associated package body.  Up until now, this has been a solid and reliable method of writing the most efficient code.

       

      My test form FRM801.fmb is contained within the attached FRM801.zip file (11.2 KB)

      I would like to know if others encounter the same compiler error.

       

      Here are the three program units.

      Package spec:

      PACKAGE P0 IS

        Dual_found  Boolean;

        Cursor Dual_cursor is

          Select 'ABC' as Col_1,

                 dummy from dual;

        Dual_row Dual_cursor%rowtype;

      END;

       

      Procedure using the package cursor:

      PROCEDURE P1_Dual(Dual_rec out P0.Dual_cursor%rowtype) IS

      BEGIN

        For R in P0.Dual_cursor Loop

          Dual_rec    := R;

          P0.Dual_Row := R;

          exit; -- quit after retrieving the first row.

        End loop;

      END;

       

      Pushbutton - When-button-pressed trigger to run the procedure and use values within the local record as well as the row in the package spec.

      Declare

        Dual_Rec   P0.Dual_cursor%rowtype;

      Begin

        P1_Dual(Dual_Rec);

        Message('Values from local Dual_rec are:  Col_1='||Dual_Rec.Col_1

                ||'  Dummy='||Dual_Rec.dummy);

        Message('Values from Pkg P0.Dual_row are:  Col_1='||P0.Dual_row.Col_1

                ||'  Dummy='||P0.Dual_row.dummy);

        Message(' ',no_acknowledge); --forces prior message to popup

      End;