PDA

View Full Version : Qt Oracle too many opened cursors



sureshbabu
30th November 2007, 16:12
Hi,

Iam facing a problem related to Oracle.
Iam calling a stored procedure which returns a ref cursor from Qt using QODBC3 driver.
Iam able to get the result(QSqlResult).

But, the oracle cursors are still opened but not closed. Since opened cursors accumulate to more than 300, Oracle throws the
following error. ORA01000 : Too many cursors opened.

I tried many ways in Qt to solve this problem (like, calling clear() method in QsqlQuery, deleting Qsqlquery object, getting handle from QsqlResult and freeing the handle). But, problem is not yet solved.

Please help me in this issue.

Thanks & Regards,
Suresh

jacek
30th November 2007, 18:09
Qt only passes data around and it doesn't know how to handle cursors. I don't use Oracle, but if that procedure opens a cursor, then you should have another one that closes it when it's no longer needed. And either you have to issue another query that will close the cursor or change your procedure in such way that it closes the cursor after it retrieves the data.