1 Reply Latest reply: Dec 12, 2012 1:31 PM by Tridus RSS

    Parameter Order

    979039
      I am testing the Beta Managed Driver and I have ran across a few issues.

      In my current Sql files which use anonymous pl/sql blocks I put the parameters in type order to make it easier to read, not call order. When I use the managed driver and parameters are not in call order I get errors like wrong type (PLS-00382) or my Ref_Cursor parameter is not a cursor (PLS-00456) or creates a "Network Session: End of file" error.

      Is there a plan to allow the parameters to passed in any order instead of call order?

      Example
      Given the following Parameters
      P0 Varchar(25) IN := 100
      P1 ref_Cursor OUT
      P2 Varchar(25) IN := 100
      P3 ref_Cursor OUT


      -- "Works"
      Begin
      :P2 := '112';
      :P0 := '112';
      OPEN :p1 For select :p0 FROM DUAL;

      OPEN :p3 For select :p0, :P2 FROM DUAL;
      END;
      ---------------------------------------------------------------------------------
      -- "Network Session: End of file"
      Begin
      :P2 := '112';
      :P0 := '112';
      OPEN :p1 For select :p0 FROM DUAL;

      OPEN :p3 For select :p0, :P2 FROM DUAL;
      END;
      ---------------------------------------------------------------------------------
      /* Error
      ORA-06550: line 4, column 8:
      PLS-00456: item 'P1' is not a cursor
      ORA-06550: line 4, column 3:
      PL/SQL: SQL Statement ignored
      ORA-06550: line 5, column 9:
      PLS-00382: expression is of wrong type
      ORA-06550: line 5, column 2:
      PL/SQL: Statement ignored
      */

      Begin
      OPEN :p1 For select :p0 FROM DUAL;
      :P0 := '112';
      :P2 := '112';
      OPEN :p3 For select :p0, :P2 FROM DUAL;
      END;