Hi
I am calling a stored procedure from my perl program and getting the value from the database. while compiling, it says wrong number or types of arguments in call to 'PROC_BY_SERIAL_NO'. i don't know what would be the problem. Could anyone help me to solve it..... I have written the code and the error below.
perl code:
#!/usr/bin/perl5
use strict;
use DBI;
use DBD::Oracle;
my $Sno = "232323277";
my $appname = "drf-120";
my $max = 12;
my $maxs = 120;
my $warra ="";
my $return = "";
my $dbh;
my $csr;
$ENV{'ORACLE_HOME'} = "/oracle/product/current";
$dbh = DBI->connect('dbi:Oracle:sdfr','wert23','ratyou')
or die "Unable to connect: $DBI::errstr";
$dbh->{RaiseError} = 1;
$csr = $dbh->prepare(q{
BEGIN
proc_by_serial_no(
:serial_number,
:app_name,
:max_time,
:max_size,
:warranty_tbl,
:return_status
);
END;
});
# The values are _copied_ here
$csr->bind_param(":serial_number", $Sno);
$csr->bind_param(":app_name", $appname);
$csr->bind_param(":max_time", $max);
$csr->bind_param(":max_size", $maxs);
$csr->bind_param_inout(":warranty_tbl", \$warra, -10);
$csr->bind_param_inout(":return_status", \$return, 100);
$csr->execute or die "exec-error $csr->errstr\n";
$csr->finish;
print $Sno, "\n";
print $appname, "\n";
print $return, "\n";
$dbh->disconnect;
------------------------------------------------------------------------
The error received is ....
ORA-06550: line 3, column 8:
PLS-00306: wrong number or types of arguments in call to 'PROC_BY_SERI
+AL_NO'
ORA-06550: line 3, column 8:
PL/SQL: Statement ignored (DBD: oexec error) at testpl1.pl line 43.
Database handle destroyed without explicit disconnect.
----------------------------------------------------------------------
+-------------
Thanks in Advance
Chintu
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.