Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: Closing Oracle cursors

by mickey (Acolyte)
on Apr 19, 2005 at 19:26 UTC ( [id://449406]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Closing Oracle cursors
in thread Closing Oracle cursors

Yes, I can retrieve data from the cursor without a problem.

I tried modifying the curref.pl example script, and I get the following error:

The package has been created... The package body has been created... These are the results from the ref cursor: 0 rows Use of uninitialized value in subroutine entry at curref.bat line 83. DBD::Oracle::st dump_results warning: at curref.bat line 83. Unable to SELECT from SYS.V_$OPEN_CURSOR: User testuser needs SELECT p +ermission. DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DB +D: oexec error) at curref.bat line 93.

So from that error message, one problem is that the user I'm connecting as doesn't have the appropriate permissions. In my workplace getting that permission will be difficult, I think.

But the last error message is noteworthy -- that's what happens when the procedure to close the cursor is called, and it's exactly what happens when I try to do the same using bind_param() instead of bind_param_inout().

There's only one variable, and I'm binding it, so I don't know why it thinks I'm not binding all variables.

Could this be a problem in my version of Perl, DBI, or DBD::Oracle?

Replies are listed 'Best First'.
Re^7: Closing Oracle cursors
by Transient (Hermit) on Apr 19, 2005 at 19:49 UTC
    To be honest, I'm not entirely sure. I haven't used cursors/refs wrt DBD::Oracle. What versions of each do you have?

    The only other suggestions I can offer is to find a DBD::Oracle forum and/or try the following I found in the Changes:
    Added ability to pass existing DBD::Oracle select statement handle (cursor) back _into_ Oracle as a ref cursor type thanks to Mike Moretti. Note that this enables a workaround for closing ref cursors: $dbh->do("BEGIN CLOSE :cursor; END;", undef, $sth_ref_csr_to_close);

      DBD::Oracle 1.16
      DBI 1.43
      Perl 5.6

      I tried that workaround as well and I get a different error:

      panic: dbd_rebind_ph alen 23 > maxlen 0 (incnul 0) at C:/Perl/site/lib +/DBI.pm line 1428.

      So I'm not sure where to go myself.

      Thanks very much for looking into it, anyway!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://449406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-19 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found