Hi,
I am trying to call an oracle function which returns a PL/SQL Index Table. (I would like to display the result set into a grid using Delphi 7) When using the OraStoredProc component I get an error message saying Unknown Datatype.
Is there any way using the OraStoredProc or OraQuery to do this.
NOTE: I do not have any problems returning REF_CURSORS.
PL/SQL Declaration
TYPE SALARY_REC IS RECORD
(From_Year VARCHAR2(4),
To_Year VARCHAR2(4),
Salary NUMBER,
Salary_Increase_factor NUMBER,
Adjusted_Salary NUMBER
);
Type SALARY_TAB IS TABLE OF SALARY_REC
INDEX BY BINARY_INTEGER;
Function Salary_Adjustment(Employee_ID VARCHAR2
RETURN SALARY_TAB;
Thanks
Sarah
Problems with Return value PL/SQL Index Table
ODAC does not support stored procedures with PL/SQL table parameters because such type is not supported by OCI.
You can use global nested table type (not from a package):
You can use global nested table type (not from a package):
Code: Select all
CREATE TYPE SALARY_OBJ AS OBJECT
(From_Year VARCHAR2(4),
To_Year VARCHAR2(4),
Salary NUMBER,
Salary_Increase_factor NUMBER,
Adjusted_Salary NUMBER
);
CREATE TYPE SALARY_TAB AS TABLE OF SALARY_OBJ;