
Using SQL stored procedure in Perl
Hi ,
Take a look at the following piece of code...i think this will help
you out...
------------------------begin of code---------------------------------
my($cntr)=0; #This is the input parameter for my procedure
my($res)=''; #This is the output from my procedure
my($dbh) = DBI->connect($dsname, $dbuser, $dbpasswd);
my ($sql_stmt) = "begin gimmedateback_procedure(:1,:2); end;";
my ($csr) = $dbh->prepare($sql_stmt);
$csr->bind_param(1, $cntr);
$csr->bind_param_inout(2, \$res,10);
my $status = $csr->execute();
------------------------end of code-----------------------------------
P.S:- Please trap the errors.....in the above code
Rajesh
"The fact is, your brains are built to do Perl programming
--Larry Wall"
Quote:
> Hi, I have SQL stored procedure called "getinfo" with a SQL statement
> "select id, name from customer". Now how do I write the perl script
to
> use this stored procedure and display the result to the browser by
using
> DBConnect(), DBDoSQL() and other functions?
> Thank you!!!!!
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.