|
When i close TOCIQuery, i see in select * from v$open_cursor, that cursor remains opened ... |
|
|
|
|
Sep 19, 2006 |
When i close TOCIQuery, i see in select * from v$open_cursor, that cursor remains opened. Is that a bug or something else ?
TOCIQuery have server cursor while Prepared = True. So, if you want deallocate cursor you should execute: Query1.Close; Query1.UnPrepare; The same you can achieve calling: Query1.Disconnect; But after that cursor will remain in v$open_cursor :)) Why ? Some kind of Oracle server optimization. Really such cursors will be deallocated, when Oracle collect "garbage". It is, for example, in case, when count of open cursors grows up to OPEN_CURSORS. So UnPrepare call actually only marks cursor as free ... |