Hi, I'm calling an external Stored Procedure written in PL/SQL that
includes one input argument and an output argument that is a REF CURSOR.
When I run the code I get the error's indicated below. Any ideas on what
needs to be changed?
If it is a procedure (as opposed to a function), it does not have a return value...
(just an OUT parameter)
my $func = $dbh->prepare("BEGIN :out_cursor :=
PackageName.ProcedureName(:p1,:out_cursor); END;");
$func->bind_param(":p1",$IN_FILE_NM);
$func->bind_param_inout(":out_cursor", \$out_cursor, 0,{ ora_type=>ORA_RSET
} );
$func->execute;
try
BEGIN PackageName.ProcedureName(:p1,:out_cursor); END;
instead.
Also, please have a look at DBIx::ProcedureCall. If it works in this case (and I think it does), you can simply write
use DBIx::ProcedureCall qw (Package.Procedure:packaged:procedure);
my $out_cursor
my $func = Package::Procedure ( $dbh, $IN_FiLE_NM, [ \$out_cursor, 0,{ ora_type=>ORA_RSET } ];
Cheers,
Thilo