Please, help...
My server (Oracle 9i) has the following stored procedure:
/* ---------------------------------------------------------------- */
create or replace package my_pac_my
is
type my_curs is ref cursor;
procedure tree_obj_1(Out_Data out my_curs);
procedure tree_obj_2(Out_Data1 out my_curs, Out_Data2 out my_curs);
end pac_cobra_03d;
create or replace package body my_pac_my
is
procedure tree_obj_1(Out_Data out my_curs)
is
begin
open Out_Data for ...
end;
procedure tree_obj_2(Out_Data1 out my_curs, Out_Data2 out my_curs)
is
begin
open Out_Data1 for ...
open Out_Data2 for ...
end;
end;
/* ---------------------------------------------------------------- */
Delphi code: (we use Delphi7 (build 4.453) and ODAC 5.70.1.33, but in 5.70.0.28 and in 2.60.2.19 we have this problem to...)
//
OraSession := TOraSession.Create(nil);
OraSession.Connected := false;
OraSession.LoginPrompt := false;
OraSession.ConnectPrompt := false;
OraSession.Options.Net := false;
OraSession.Options.DateFormat := 'DD-MM-YYYY';
//
OraSession.HomeName := 'Database';
OraSession.Username := 'system';
OraSession.Password := 'manager'
//
OraSession.Options.Net := true;
OraSession.Server := '192.168.0.1:1521:Database';
OraSession.Connected := true;
//
OraSql1 := TOraSql.Create(nil);
OraSql1.Session := OraSession;
OraQuery1 := TOraQuery.Create(nil);
OraQuery1.Session := OraSession;
//
OraSQL1.SQL.Text := 'begin my_pac_my.tree_obj_1(:out_data); end;';
OraSQL1.ParamByName('out_data').DataType := ftCursor;
OraSQL1.Execute;
// OK!!!
// !!! but if...javascript:emoticon(':(')
OraSQL1.SQL.Text := 'begin my_pac_my.tree_obj_2(:out_data1, :out_data2); end;';
OraSQL1.ParamByName('out_data1').DataType := ftCursor;
OraSQL1.ParamByName('out_data2').DataType := ftCursor;
OraSQL1.Execute;
// Then we get an error: "Net error: maximum open cursors exceeded"
// !!!!!!!!!
I think that the cause of the problem is count of ref cursors: when we get 1 ref cursor we don't have the error. Why?!!!
Thank you!!!!