DBD::Oracle::st execute failed: ORA-06550: line 3, column 4: PLS-00306: wrong number or types of arguments in call to 'INIT_DELTA_SP'



I am calling a stored procedure from Perl Program

my $load_id = 10;
my $source = "WEBCRD";
my $prnt_exec_flg = "0";
my $return_status;
my $sqlerrm_pi;

eval {
my $sth = $dbh->prepare(q{
BEGIN
mdr_admin.build_source_delta_pkg.init_delta_sp
(
v_load_id_in => :v_load_id,
v_source_in => :v_source,
prnt_exec_flg_in => :prnt_exec_flg,
n_status_inout => :n_status,
v_sqlerrm_pi_inout => :v_sqlerrm_pi
);

END;
});

$sth->bind_param (":v_load_id", $load_id+0);
$sth->bind_param (":v_source", "$source");
$sth->bind_param (":prnt_exec_flg", "$prnt_exec_flg");
$sth->bind_param_inout (":n_status", \$return_status, 0);
$sth->bind_param_inout (":v_sqlerrm_pi", \$sqlerrm_pi, 'OK');
$sth->execute;
};

if( $@ ) {
warn "Execution of stored procedure failed
because:\n\t$DBI::errstr\n$@";
} else {
print "Status returned by Stored Procedure = %d\n", $return_status;
}

I am getting the following error:

DBD::Oracle::st execute failed: ORA-06550: line 3, column 4:
PLS-00306: wrong number or types of arguments in call to
'INIT_DELTA_SP'
ORA-06550: line 3, column 4:
PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator
at char 18 in '
BEGIN

<*>mdr_admin.build_source_delta_pkg.init_delta_sp
(
v_load_id_in => :v_load_id,
v_source_in => :v_source,
prnt_exec_flg_in => :prnt_exec_flg,
n_status_inout => :n_status,
v_sqlerrm_pi_inout => :v_sqlerrm_pi
);

END;
') [for Statement "
BEGIN
mdr_admin.build_source_delta_pkg.init_delta_sp
(
v_load_id_in => :v_load_id,
v_source_in => :v_source,
prnt_exec_flg_in => :prnt_exec_flg,
n_status_inout => :n_status,
v_sqlerrm_pi_inout => :v_sqlerrm_pi
);

END;
" with ParamValues: :n_status=undef, :v_sqlerrm_pi=undef,
:v_load_id=10, :v_source='WEBCRD', :prnt_exec_flg='0'] at dbaccess line
97.
Status returned by Stored Procedure = %d

Any help is appreciated to fix the problem.

Thanks,
Vaidy

.



Relevant Pages

  • Re: DBD::Sybase and $sth->{syb_result_type} v. DBD::ODBC (Sql Server)
    ... write output parameters and return a value. ... individual operations in the procedure by calling odbc_more_results. ... Things get a little more complex for what I guess Sybase calls CS_MSG_RESULT ... the status from a stored procedure was ...
    (perl.dbi.users)
  • Re: xplog70.dll
    ... What extended stored procedure are you calling from ... >I have a job that executes a DTS-package which in turn call a store procedure ...
    (microsoft.public.sqlserver.security)
  • Re: Foreign key constraints problem in SNC SQL Native client
    ... calling one stored procedure before calling dw_1.update method. ... stored procedure system is trying to delete parent data from Table A. ... rows from table B before deleting the related rows from A. ...
    (microsoft.public.sqlserver.connect)
  • Re: ntext/>8K as OUTPUT param
    ... You can create a temporary table in the calling stored procedure, ... > very complex and needs to EXEC some sql which cannot be done in a UDF. ... > I have found some references to calling a COM .dll using sp_OA*, ...
    (microsoft.public.sqlserver.programming)
  • Re: Best practice
    ... > Best coding strategies for calling stored procedures from ASP.NET. ... > objOracleParameterSTATUS = new System.Data.OracleClient.OracleParameter ... > So on the whole we are setting 9 properties for a single parameter and if ... > this stored procedure accepts 10 parameters, then this process has to be ...
    (microsoft.public.dotnet.framework.aspnet)