Hello,
I have a few different PLSQL packages stored on an ORACLE DB. For each of these, I have a seperate perl program to call each one similiar to this following statement(snipped for simplicity):

-- begin code segment --
# Statement handler to call database package
my $sth = $dbh->prepare(q{
BEGIN
upload_validation.FILE_FORMAT_VALIDATION(?,?);
END;
});

$sth->bind_param(1,$load_type);
$sth->bind_param(2,$product);
$sth->execute();
-- end code segment --
The issue I am having, the different stored procedures have a different number of parameters. Upload_validation has 2, while check_employee has 5 etc etc.

I want to have a generic perl program that will take in the procedure name and the parameters the stored procedure will take. I having issues because of I can not get around the ? part of the prepare statment. If I send too few args or too many, it dies with a PLSQL error saying wrong number or types of arguments to call FILE_FORMAT_VALIDATION.

Just wondering if this is possible to make a sort of generic driver, or should we stick to making a seperate perl program for each stored procedure PLSQL we need to call.

-------------------------------
Just Your Friendly Neighborhood
_SPIDEY_

In reply to Generic PLSQL Launcher by SPIDEY

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.