PERL DB中的使用说明:
--一般调用方式:
$csr = $db->prepare(q{
BEGIN
PLSQL_EXAMPLE.PROC_NP;
END;
});
$csr->execute;
--带传入参数的调用
my $err_code = -20001;
$csr = $db->prepare(q{
BEGIN
PLSQL_EXAMPLE.PROC_IN(:err_code);
END;
});
$csr->bind_param(":err_code", $err_code);
eval {
$csr->execute;
};
--带传入,输出参数的调用
my $test_num = 5;
my $is_odd;
$csr = $db->prepare(q{
BEGIN
PLSQL_EXAMPLE.PROC_IN_INOUT(:test_num, :is_odd);
END;
});
# The value of $test_num is _copied_ here
$csr->bind_param(":test_num", $test_num);
$csr->bind_param_inout(":is_odd", $is_odd, 1);
# The execute will automagically update the value of $is_odd
$csr->execute;
$sth->bind_param( 1,$key);
$sth->bind_param_inout( 2, $update, 1000 );
$sth->execute();
这样就可以了,不明白!问题已解决!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7916042/viewspace-1010133/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7916042/viewspace-1010133/