| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Stored procedures and Forms
Hi my name is Xavier Costey and I´ve a problem:
I program with Oracle Forms Ver 5.
I assign a stored procedure to a Data Block. This runs well,
but when the program is executed the number times of the variable
OPEN_CURSORS
then forms raises with the error number ORA-01000.
Questions:
Thanks
ORA-01000 : maximum open cursors exceeded
A host language program attempted to open too many cursors. The
initialization parameter OPEN_CURSORS determines the maximum
number of
cursors per user.
Example of stored procedure :
/****************************************************************************************/
ID tercers.id%type,
TIP_TERCER tip_tercers.descripcio%type,
NOM tercers.nom%type,
COGNOMS tercers.cognoms%type,
COGNOM2 tercers.cognom2%type,
NIF tercers.nif%type,
NOM_COMERCIAL tercers.nom_comercial%type,
tip_terecer_codi tip_tercers.codi%type,
client_id clients.id%type
);
type cursor_tipus_tercer is ref cursor return tipus_registre_tercer;
Procedure select_tercer(codi_tercer number, retval in out cursor_tipus_tercer);
end contracte_generic;
/
show errors;
/****************************************************************************************/
Procedure select_tercer(codi_tercer number, retval in out
cursor_tipus_tercer) is
text_error varchar2(200);
begin
open retval for select tercers.id, tip_tercers.descripcio tip_tercer,tercers.nom,
tercers.cognoms, tercers.cognom2,tercers.nif,
tercers.nom_comercial,
tercers.tip_tercer_codi,clients.id
from tercers, tip_tercers,clients
where tercers.id = codi_tercer and
tercers.tip_tercer_codi = tip_tercers.codi and
tercers.id = clients.tercer_id(+);
exception
when others then
text_error := sqlerrm;
insert into
errors_departament(form,missatge)values('Package',text_error);
commit;
end;
/****************************************************************************************/
![]() |
![]() |