2 Replies Latest reply: Mar 4, 2013 1:04 AM by Timo Hahn RSS

    Java and PL/SQL Procedure with IS TABLE OF variable

    user10177353
      Hi All,
      Below is the scenario, where we are facing problems. Kindly help.
      1) Java program has to access the below PL/SQL Package.Procedure
      PROCEDURE Get_Employee_ID_List(p_emp_id_array_size IN number, p_emp_id_tab OUT t_emp_id_tab );
      where, p_emp_id_array_size is sent by Java as 100.

      2) Following is in PL/SQL
      PROCEDURE Get_Employee_ID_List(p_emp_id_array_size IN number, p_emp_id_tab OUT t_emp_id_tab);
      where,
      a) SUBTYPE t_emp_id IS T_EMPLOYEE.emp_id%TYPE;
      b) the type t_emp_id_tab is table of t_emp_id index by binary_integer;

      3) PL/SQL will populate the p_emp_id_tab with 100 of employee id and sends back to Java.

      This is working fine with Oracle 9.2 and Pro*C. However we have to migrate the same functionlity into Oracle 9.2 and Java. But since Java cannot read the types declared within PL/SQL Packages, is there a best way to achieve this functionality.

      In otherwords, all we have to do is send the 100 of emp_id back to Java.

      Thanks in advance,