Stored Procedures Parameters

From: Denesa K Shaw (denesa.shaw_at_CenterPointEnergy.com)
Date: 10/20/04


To: dbi-users@perl.org
Date: Wed, 20 Oct 2004 15:27:37 -0500


Hi,
I'm calling a stored procedure called Pg_Move_Files.Pr_Return_Cycle_File.
After the stored procedure executes, it returns an out parameter called
out_v_RECV_FILE_NM.
I have a perl script which uses the DBI:: Module.
My Question is:
Is the correct way retrieve the value of my out
parameter(out_v_RECV_FILE_NM) from the stored procedure in my Perl script?
Thanks!

This is the code I used:

####Declarations####
use DBI;
$dbname = 'xxxx';
$user = 'xxxx';
$password = 'xxxxxx';
$dbd = 'Oracle';
$RECV_FILE_NM = $out_v_RECV_FILE_NM;

####Connect To Oracle####
$dbh = DBI->connect ($dbname, $user, $password, $dbd);

if (!$dbh)
{
     print "Error connecting to database; $DBI::errstr\n";
}

else
{
print "Connecting to database; $DBI::errstr\n";
}

####Calling Pg_Move_Files.Pr_Return_Cycle_File stored procedure####

print "Calling Pg_Move_Files.Pr_Return_Cycle_File\n";
$dbh->do( "BEGIN Pg_Move_Files.Pr_Return_Cycle_File($RECV_FILE_NM); END;");

Denesa Shaw



Relevant Pages

  • RE: Syntax for calling stored procedure from Perl Script
    ... Syntax for calling stored procedure from Perl Script ... Do you Yahoo!? ...
    (perl.dbi.users)
  • Stored Procedure call using MSSQL::DBLIB
    ... I'm trying to call a stored procedure from a perl script using the ... (date, id #, current timestamp). ... date (yyyy/mm/dd) ...
    (comp.lang.perl.modules)
  • Re: Calling a SQL Server Stored Procedure from within Perl
    ... Thanks for those discussions about warnings and errors. ... I was merely asking for a Perl script that could execute a ... stored procedure. ...
    (comp.lang.perl.misc)
  • RE: No hit on breakpoint in webservice
    ... It is the line of code where I call the stored procedure in SQL ... The stored procedure executes OK. ... >>I have two web services on a local machine, ... >>How can I debug the web service visual basic code? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Deleting Multiple Rows
    ... for the sake of simplicity). ... I have an application that interacts with this table ... Should the app execute a stored procedure 300 times - once for each row to ... need to be deleted and then the stored procedure executes only one DELETE ...
    (microsoft.public.sqlserver.programming)