1 Reply Latest reply on Sep 4, 2002 2:10 PM by 82532

    VB: Returning PL Tables with Multiple Coulumns form Stored Procs

    331850
      I have a stored procedure as below

      CREATE OR REPLACE PACKAGE PK_EMPLOYEE AS

      TYPE ERec IS RECORD
      (eno EMPLOYEE.EMPNO%TYPE,
      ename EMPLOYEE.ENAME%TYPE
      );

      TYPE TTypeTab IS TABLE OF ERec index by BINARY_INTEGER;
      TYPE RefCurType IS REF CURSOR RETURN EMPLOYEE%ROWTYPE;

      PROCEDURE GetEmpPL(ret OUT TTypeTab);

      END PK_EMPLOYEE;

      CREATE OR REPLACE PACKAGE BODY PK_EMPLOYEE AS
      PROCEDURE GetEmpPL(ret OUT TTypeTab) IS
      cCur RefCurType;
      cR EMPLOYEE%ROWTYPE;
      nCount NUMBER:=1;
      BEGIN
      OPEN cCur FOR SELECT * FROM EMPLOYEE;
      LOOP
      FETCH cCur INTO cR;
           EXIT WHEN cCur%NOTFOUND OR cCur%NOTFOUND IS NULL;
      ret(nCount).ename := cR.ename;
      ret(nCount).eno := cR.empno;
      nCount:=nCount+1;
      END LOOP;
      CLOSE cCur;
      END GetEmpPL;

      END PK_EMPLOYEE;

      can any one help me to get TTypeTab to VB from this?