3 Replies Latest reply: Dec 21, 2012 4:03 AM by Sameer Sai RSS

    Form compilation failing when I am using Associative Arrays call in form

    981199
      I am using Forms 6i and Oracle Version I am using is 10g.

      I have written a procedure and the procedure has one of the out parameter as an associative array.

      For eg: The below procedure
      sample (var1 in varchar2, recordval1 out recordvararr)

      TYPE recordvararr IS TABLE OF VARCHAR2 INDEX BY PLS_INTEGER;
      recordarr recordvararr;

      Procedure got compiled successfully and I am able to execute it separately.

      But when i tried to call this procedure from form:

      I have created a button and have written this code in WHEN-BUTTON-PRESSED trigger, while compilation its giving the following error when I am trying to associate the value to a variable.

      Eg: WHEN_BUTTON_PRESSED trigger code
      DECLARE
      TYPE recordvararr IS TABLE OF VARCHAR2 INDEX BY PLS_INTEGER;
      recordarr1 recordvararr;
      BEGIN
      --
      -
      -
      v_value_1 := recorarr1(1); --- Failed with the error *"PLSQL TABLE type should have index as binary_integer"*
      END;

      If I use binary_integer in procedure its working fine.

      But I just wanted to know whether there is any restriction to use PLS_INTEGER for creating a record in Forms 6i.

      If so, please give me some explanation.

      Thanks,
      Sameer