Do it a PLSQL block as in:

$dbh->do( "BEGIN
                index_reporting.index_report($pass);
            END; " );

If that does not work explicitly compiling the statement and executing
it useing something like:

        $sth = $dhb->prepare( "
                BEGIN
                index_reporting.index_report(?);
                END; " );
        $sth->bind_param( 1, $pass );
        $sth->execute();

This is all in The Fine Manual: perldoc DBI and perldoc DBD::Oracle.
It is also in the fine book. (the cheetah book)

NB:  I assume this proc creates a table or something, and you are not
expecting
see the output in stdout.

Lincoln



-----Original Message-----
From: Stan Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 8:02 AM
To: [EMAIL PROTECTED]
Subject: How to execute an Oracle PLSQL procedure with dbi?



OK, this sounded simple, but I must be doing soemthing wrong.

I have a PLSQL procedure whch I can execute sucsefully from the SqlPLus
command line as follows:

execute index_reporting.index_report(1)

So, I thought I could simple do this in my perl script:

$dbh->do("execute index_reporting.index_report($pass)");

But that does not work.

So what am I doing wrong?

-- 
Stan Brown     [EMAIL PROTECTED]
843-745-3154
Charleston SC.
-- 
Windows 98: n.
        useless extension to a minor patch release for 32-bit extensions and
        a graphical shell for a 16-bit patch to an 8-bit operating system
        originally coded for a 4-bit microprocessor, written by a 2-bit 
        company that can't stand for 1 bit of competition.
-
(c) 2000 Stan Brown.  Redistribution via the Microsoft Network is
prohibited.

Reply via email to