Re: (Fwd) RE: DBD::Oracle: closing bound cursors

From: Jared Still (jkstill_at_cybcon.com)
Date: 12/21/03

  • Next message: Jared Still: "RE: Optimization for faster select..."
    To: pkuijven@office.kabelfoon.nl
    Date: 20 Dec 2003 19:02:51 -0800
    
    

    I'm a little late picking up on this thread, but I do
    have a question.

    Why are you closing the cursor?

    When you disconnect, all your cursors will be closed.

    If you aren't disconnecting, the only good reason for
    closing a cursor is that you will no longer be using
    it during the session, which may be true in your case.

    Kind of hard to tell from a code fragment.

    Prepare your cursor with place holders, leave it open,
    execute as needed with bind variables.

    This makes for *much* less work for the database.

    Jared

    On Tue, 2003-12-09 at 12:08, Tim Bunce wrote:
    > ----- Forwarded message from Patrick Kuijvenhoven <pkuijven@office.kabelfoon.nl> -----
    >
    > Delivered-To: tim.bunce@pobox.com
    > Subject: RE: DBD::Oracle: closing bound cursors
    > Date: Tue, 9 Dec 2003 14:18:21 +0100
    > From: "Patrick Kuijvenhoven" <pkuijven@office.kabelfoon.nl>
    > To: <Tim.Bunce@pobox.com>
    >
    > Hi Tim,
    >
    > sorry for bothering you by e-mail. I have a problem similar to http://www.bitmechanic.com/mail-archives/dbi-users/Jul1999/0802.html. This thread ended with your reply: no solution. :(
    >
    > Unfortunatly hours of searching Google didn't help me. The documentations says something about closing cursors, but that doesn't work for me.
    >
    > I am using
    >
    > my $func = $dbh->prepare(q{
    > BEGIN
    > :rv := caizen$change.pf_ref_abonnement(pi_abokab_abonnee_nr => :pi_abokab_abonnee_nr);
    > END;
    > });
    >
    > $func->bind_param(":pi_abokab_abonnee_nr", $nr);
    > $func->bind_param_inout(":rv", \$rv, 0, { ora_type => ORA_RSET });
    > $func->execute;
    >
    > to bind my cursor. Now i want to close it. Can you help me?
    >
    > Kind regards,
    >
    > Patrick Kuijvenhoven,
    > Research and Development Team
    > Kabelfoon
    >
    >
    > ----- End forwarded message -----


  • Next message: Jared Still: "RE: Optimization for faster select..."

    Relevant Pages

    • Re: Find and Find Next
      ... The user then proceeds to enter data. ... want to set up as part of my closing of the form a find record that matches ... certain criteria and the cursor goes to that record. ...
      (microsoft.public.access.formscoding)
    • Re: Computer being taken over
      ... > My computer will be working fine and all of a sudden the cursor starts ... random programs are opening and closing. ...
      (microsoft.public.win2000.general)
    • Computer being taken over
      ... My computer will be working fine and all of a sudden the cursor starts ... random programs are opening and closing. ...
      (microsoft.public.win2000.general)
    • Re: Dynamic cursor not working in external stored procedure
      ... before you either execute a new PREPARE statement or OPEN the cursor ... If you try to execute an OPEN-Statement ... If closing the cursor will be a problem, the option CLOSQLCSR *ENDMOD ...
      (comp.sys.ibm.as400.misc)
    • Re: Setting bind variables or defines from applications?
      ... Reopening cursors? ... we use ODBC (and running ODBC in ... Didn't hear of bind variables. ... returning a REF cursor? ...
      (comp.databases.oracle.misc)