Calling a stored procedure in Perl : Perl : Procedure Function SQL / MySQL


SQL / MySQL » Procedure Function » Perl »

 

Calling a stored procedure in Perl


 
        
$dbh = DBI->connect("DBI:mysql:$database:$host:$port","$user""$password",PrintError => 0}) || die $DBI::errstr;
                  
if ($dbh->do("call error_test_proc(1)"))
{
    printf("Stored procedure execution succeededn");
}
else
{
    printf("Error executing stored procedure: MySQL error %d (SQLSTATE %s)n %sn",
             $dbh->err,$dbh->state,$dbh->errstr)
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Procedure Function
» Perl