mohammedf
asked on
Oracle Database link
i have a database link and i want to use it to return
result set of data...
when i use ref corsure i faced error ora-10001.
in form when i build a form on procedure that return ref corsure
the form work correctly localy
but it do not work on database link....
any ideas plz
result set of data...
when i use ref corsure i faced error ora-10001.
in form when i build a form on procedure that return ref corsure
the form work correctly localy
but it do not work on database link....
any ideas plz
Apparently you have an invalid cursor in your code block. Please post the code as a snippet. And, I have no idea what word you mean by "corsure" -- regrets and please clarify.
ASKER
hi
the procedure that retures the cursor is working 100% on the local Database , but in the other database that i have link to it , it did not work ,,
so i guess the problem is in the link,,im not sure
the procedure that retures the cursor is working 100% on the local Database , but in the other database that i have link to it , it did not work ,,
so i guess the problem is in the link,,im not sure
please post the code
ASKER
create or replace package reg_pack as
TYPE rec IS RECORD(cd_tb_cd rg_code_tb.cd_tb_cd%TYPE,
cd_cd rg_code_tb.cd_cd%TYPE,
CD_ARB_TR rg_code_tb.CD_ARB_TR%TYPE);
type my_ref is ref cursor RETURN rec;
procedure test_ref_proc(my_cur in out my_ref);
end reg_pack;
create or replace package body reg_pack as
procedure test_ref_proc(my_cur in out my_ref) is
begin
open my_cur for select cd_tb_cd,cd_cd,cd_arb_tr from rg_code_tb
where cd_tb_cd=0;
end test_ref_proc;
end reg_pack;
CREATE TYPE code_tab AS OBJECT
(code_main number(5),
code_sub number(5),
Icode_desc VARCHAR2(50));
/
CREATE TYPE code_tab_table AS VARRAY(1000) OF code_tab;
/
CREATE FUNCTION gets_code (code_main number)
RETURN code_tab_table PIPELINED IS
v_tab code_tab_table := code_tab_table();
begin
FOR cur IN (SELECT cd_tb_cd,cd_cd,cd_arb_tr
FROM rg_code_tb
WHERE cd_tb_cd =code_main
ORDER BY cd_cd)
LOOP
PIPE ROW(code_tab(cur.cd_tb_cd, cur.cd_cd, cur.cd_arb_tr));
END LOOP;
RETURN;
END;
where is the db link involved?
what line generates the error?
what line generates the error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
May we be of any further assistance or has this been abandoned?