
OraPerl and PL/SQL Stored Procedure
Date: Wed, 8 Oct 1997 12:22:59 -0700
Newsgroups: comp.databases.oracle.tools, comp.databases.oracle.misc,
comp.lang.perl.misc
Subject: Oraperl - PL/SQL Question
I am running into a problem returning OUT parameters from a PL/SQL stored
procedure. Although the procedure is exec'ing (I verified it by logging
into a table), the output argument is not getting set in perl.
I am pre-assigning values to the output variable. Here is a mock up code.
#!/usr/local/bin/perl5
use Oraperl;
$ENV{ORACLE_HOME} = ...
.
.
.
$in_var = 'A';
$out_var = 'X';
$csr = &ora_open ($lda, <<EOQ) ;
BEGIN
PROC1 (:1, :2);
END;
EOQ
&ora_bind($csr, $in_var, $out_var);
print $out_var, "\n";
&ora_close($csr);
-----------------------------------------------------------
PROCEDURE PROC1( in_var IN varchar2, out_var OUT varchar2)
IS
BEGIN
out_var := in_var;
END ;
----------------------------------------------------------
Any suggestions ?
Sridhar