in reply to calling stored procedures in oracle

There may be an easier/better way, but I think you can just do this:
my $rv = $dbh->do("begin foo_procedure(?); end;", undef, 'iowa') or die "Can't do: ", $dbh->errstr;
where 'iowa' is, obviously, just an example of a bind variable.

Replies are listed 'Best First'.
RE: Re: calling stored procedures in oracle
by aDayLate (Initiate) on Mar 22, 2000 at 03:33 UTC
    How do I get the output from the stored procedure the $rv is a boolean.
      If the drivers for Oracle are like Informix you just have to treat the stored procedure just like a normal query: execute it first, then fetch from it to retreive the values. ie. my $sth = $dbh->prepare("execute new_procedure()"); $sth->execute(); my $rowref = $sth->fetch(); However a quick scan of my laptop shows that perldoc DBD states that calling stored procedures is driver dependent, so it may be slightly different for Oracle, good luck.