On 03/16/2005 08:25 AM, Charles Jardine said:

perldoc DBD::Oracle says, under "Binding Cursors":

 To close the cursor you (currently) need to do this:

$sth3 = $dbh->prepare("BEGIN CLOSE :cursor; END;");
$sth3->bind_param_inout(":cursor", \$sth2, 0, { ora_type => ORA_RSET } );
$sth3->execute;


This works, and demonstrates that a cursor got from PL/SQL
may be passed back to PL/SQL. However, I doubt that it is
necessary. Tracing shows that, if I let $sth2 go out of scope,
the destructor frees the OCI statement handle. Surely this
will cause the cursor's resources will be released.

Does anyone know why this was once thought to be necessary?

It frees the client side handle, but probably doesn't tell the RDBMS that the cursor is no longer needed.


--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to