Hello Freinds,

            Can any one tell me how to call execute the stored function
in the database from perl.  I am using the following code to call the
function in Oracle database

eval
{
    my  $func =$dbh->prepare(q{
    BEGIN

    :rv := InsertProcess(parameter1_in => :parameter1,
                                       parameter2_in => :parameter2,
                                       parameter3_in => :parameter3,
                                       parameter4_in => :parameter4,
                                       parameter5_in => :parameter5,
                                       parameter6_in => :parameter6,
                                       parameter7_in => :parameter7,
                                       parameter8_in => :parameter8,
                                       parameter9_in => :parameter9
                                     );

    END;

    });
    $func->bind_param(":parameter1",$ProcessName);
    $func->bind_param(":parameter2",$pdesc);
    $func->bind_param(":parameter3",$prcTypeId);
    $func->bind_param(":parameter4",$FilePath);
    $func->bind_param(":parameter5",$Template);
    $func->bind_param(":parameter6",' ');
    $func->bind_param(":parameter7",'AV');
    $func->bind_param(":parameter8",'E004');
    $func->bind_param(":parameter9",$RoleId);
    $func->bind_param_inout(":rv", \$rv , 6);
    $func->execute;
};


IT is giving the following error.

Execution of stored function fail ::
ORA-06550: line 4, column 10: PLS-00306: wrong number or types of
arguments in call to 'INSERTPROCESS'
ORA-06550: line 4, column 3: PL/SQL: Statement ignored (DBD ERROR:
OCIStmtExecute)

I have made it clear that the parameters being passed to the functions
are of correct number and type, eventhought it is giving me this error,
any help in this regard will be appreciated.



Thanks in Advance
Amarnath.K.Habib
Software Engineer
Bangalore-560068
Karnataka
India





Reply via email to