pl/sql 中调用ora存储过程,若传入/传出参数是自定义包中的数据类型时,编译不通过,报错ORA-00922:缺少或无效选项。何解? 3Q :)附代码段:
create or replace package pkg_zxh
astype rcd_type_zxh is record(stdno integer,stdname varchar2(20),birth date);
type tab_type_zxh is table of rcd_type_zxh index by binary_integer;
type csr_type_zxh is ref cursor;end;
/create or replace procedure pro_zxh (p_no in integer,p_csr out pkg_zxh.csr_type_zxh)
as
mycsr  pkg_zxh.csr_type_zxh;
begin
open mycsr for 'select * from tab_zxh where myno='||p_no||'' using p_no;
--fetch mycsr into p_rcd.stdno,p_rcd.stdname,p_rcd.birth;
--close mycsr;
end;
/
create or replace pro_zxh2(p_rcd in out pkg_zxh.rcd_type_zxh)
asv_id integer ;
begin
v_id := 100;
pro_zxh(v_id,p_rcd);
v_id := 10;
v_id := fun_zxh(p_rcd);
end;
/