Ora-01000 - maximum open cursors exceeded error
- by PeteDaMeat
I am receiving the following error message within my Delphi/Oracle application "ora-01000 - maximum open cursors exceeded". The code is as follows:
begin
for i := 0 to 150 do
begin
with myADOQuery do
begin
SQL.Text := 'DELETE FROM SOMETABLE';
ExecSQL; -- from looking at V$OPEN_CURSOR a new cursor is added on each iteration for the session
Close; -- thought this would close the cursor but doesn't
end;
end;
end;
I'm aware I can resolve the problem by simply increasing the number of OPEN_CURSORS parameters, however, I would rather find a solution whereby the cursor is closed after the query is executed. Any ideas?
Delphi 2006 BDS
Oracle 10g