in reply to Getting stored procedure results from Oracle using Perl
This the the best introductory page I've come across learning about using Oracle stored procedures with Perl.
Update: After looking at the above page again, I realise that it doesn't show how to get the results from a ref cursor. To do so, just use something like:
my $sql = "BEGIN :res := my_package.my_function; END;"; my $sth = $dbh->prepare($sql) $sth->bind_param_inout( ":res", \$result, 0, { ora_type => ORA_RSET } +);
$result will have your result set. You'll also need to import the ORA_RSET constant:
use DBD::Oracle qw(ORA_RSET);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting stored procedure results from Oracle using Perl
by hakkr (Chaplain) on Jul 27, 2005 at 12:56 UTC |