note
arturo
<p>This may have changed recently, but for a long time the recommended way to execute a stored procedure in Oracle through DBI is to essentially execute an anonymous procedure that calls it, like so:
<code>
$SQLString =<<END_OF_SQL;
BEGIN
OSP_FOO_BAR( ?, ?, ? );
END;
END_OF_SQL
$db->do( $SQLString, undef, $xvar, $yvar, $zvar )
or die "Can't execute $SQLString: " . $db->errstr();
</code>
</p>
<p>In case you're unfamiliar with the notion, the ? are placeholders, whose values get replace by your x, y, and z vars in the <code>do</code> call. The <code>undef</code> in the <code>do</code> call is required to use placeholders with the DBI's <code>do</code> method (you probably don't need to know exactly why, but you do need something there).
</p>
<p><b>Update</b>d the code to fix one syntax error and misleading syntax.</p>
<p>This way of executing stored procedures is documented in [cpan://DBD::Oracle]</p>
<p class="mysig">If not P, what? Q maybe? <br />"Sidney Morgenbesser"</p>
274533
274533