Table of records as in or out parameter in store procedure?
Posted: Wed 24 Aug 2011 02:23
Ca you tell me how I can call that kind of procedure/function with table of records as input or output parameters and make use of it in C# ?
runtime error:"Invalid datatype: TABLE"
we use Linq to Oracle.
screenshoot
https://docs.google.com/leaf?id=0B1l5ui ... 2&hl=zh_TW
runtime error:"Invalid datatype: TABLE"
we use Linq to Oracle.
screenshoot
https://docs.google.com/leaf?id=0B1l5ui ... 2&hl=zh_TW
Code: Select all
CREATE OR REPLACE TYPE HR.department_type AS OBJECT
(
DNO NUMBER,
NAME VARCHAR2(50),
LOCATION VARCHAR2(50)
);
CREATE OR REPLACE TYPE HR.dept_array
AS TABLE OF DEPARTMENT_TYPE;
CREATE OR REPLACE PACKAGE HR.objecttype AS
PROCEDURE insert_object (d dept_array);
END objecttype;
/
CREATE OR REPLACE PACKAGE BODY HR.objecttype
AS
PROCEDURE insert_object (d dept_array)
AS
BEGIN
FOR i IN d.FIRST .. d.LAST
LOOP
INSERT INTO department_teststruct
VALUES (d (i).dno, d (i).name, d (i).location);
END LOOP;
END insert_object;
END objecttype;
/