Folks,
I liked this method to call stored procedure in oracle/mysql through DBI rather than calling sqlplus or mysql and then doing exec stored procedure.
$date_id =$ARGV[0];
$script_name =$ARGV[1];
$type =$ARGV[2]||0;
$status =$ARGV[3]||0;
$csr = $dbh->prepare(q{
BEGIN
stored_procedure_name(:date_id,:script_name,:type,:status);
END;
});
$csr->bind_param(":date_id", $date_id);
$obj->proc_execute($csr , "stored_procedure_name");
$dbh->disconnect;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment