On Tue, Jul 29, 2003 at 04:36:51PM -0700, Fernando Luna wrote:
> Why not do something like this?
>
> <code>
> my $csr = $dbh->prepare(q{
> BEGIN
> my_package.my_procedure(:in_param);
> :out_param := my_package.my_public_variable;
> END;
> });
> $csr->bind_param(":in_param", $in_param);
> $csr->bind_param_inout(":out_param", \$out_param, 80);
> $csr->execute;
> $csr->finish();
If I had a penny for every time finish() was used unnecessarily...
:-)
Tim.
> $dbh->disconnect();
> </code>
>
> -----Original Message-----
> From: Galbraith, Mark [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: Getting values from Oracle stored procedure
>
>
> I have been asked to call a stored procedure, and then use the value
> stored in a variable inside the package. I've looked at the
> documentation, including the appropriate chapters in Programming The
> Perl DBI (O'Reilly).
>
> I found that by changing the procedure to a function, I can call the
> function and bind the variable using bind_param_inout(). My question
> is, is this the only way to do this? Is there a better way?
>
> Environment:
>
> Perl version 5.6.1
> Oracle 8.1.6 drivers
> Perl DBI version 1.21
> Perl DBD::Oracle version 1.12
>
> Thanks in advance for any help you can give me.
>
> --
> Mark Galbraith
> Managed Services Team Leader
> Data Return LLC
>