Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> OCI and reference cursors
I have written an application that logs onto an Oracle database, opens a cursor, parses an anonymous PL/SQL block and then binds a cursor to a placeholder for a ref cursor in the procedure call. the application then goes into a loop that looks something like this in pseudocode:
while (!finished) {
call oexec on first cursor fetch stuff from (bound) reference cursor commit ...
the PL/SQL-routine that is called performs returns 0 or more rows in the ref cursor and does some updates on other tables (hence the commit).
now for my question: should I close the cursor variable that I bound to the ref cursor in the OUT parameter of the PL/SQL procedure after I'm done fetching from it and then re-bind it before every oexec()?
it seems to work fine without me closing it, but I wasn't sure if this was the correct way to do it. I didn't find anything about this in the Oracle OCI documentation.
PS: are there any good books about OCI that go a bit beyond the
bare bones that we are presented with in the Oracle OCI manual?
-Bjørn
--
Bjørn Borud <borud_at_guardian.no> | "The Net interprets censorship
<URL:http://www.pvv.unit.no/~borud/> | as damage and routes around it."
UNIX person, one of "them" | - John Gilmore
Received on Wed Apr 01 1998 - 00:00:00 CST