opened cursors after RefreshRecord

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

opened cursors after RefreshRecord

Post by Guest » Mon 16 May 2005 16:03

After qryTest.RefreshRecord, i get ORA-01000 error. Maximum number of opened cursors is set to 300. Version of Oracle client is 9.2.1.0.1. Version of ODAC is 4.00.3. Refresh procedure is :
FUNCTION refresh(
i_unit IN unit%TYPE
)
RETURN cur_unit IS
cur_output cur_unit;
BEGIN
OPEN cur_output FOR
SELECT *
FROM unit
WHERE unit_number = i_unit_number;
RETURN cur_output;
CLOSE cur_output;
EXCEPTION
WHEN OTHERS THEN CLOSE cur_output;
END refresh;
cur_unit is REF CURSOR.
But on oracle client version 9.0.1.0.1 this works properly, and only one cursor is opened.
How i can make this code work on oracle client 9.0.1.0.1 ?

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 17 May 2005 12:43

It's looks like Oracle issue, to solve it try change function to procedure and set IN OUT type of cursor variable. Or you can update Oracle client to 9.2.0.4. This problem does not happen here.

P.S. I strongly recomend to update your ODAC version to the latest one (update within one version is for free i.e. you can get ODAC 4.50.3.24 at least).

Post Reply