Well I spent the last few mins playing with a similar overloaded
procedure found here
http://www.psoug.org/reference/packages.html, you have to scroll down a
bit to '*Package Overloading'
*and I got it to work with this code
my $dbh =$dbh = DBI->connect('dbi:Oracle:',xxx','xxx');
$sth = $dbh->prepare("begin overloaded.insby(?); end;");
$sth->bind_param(1, 22);
$sth->execute();*
*and
$sth = $dbh->prepare("begin overloaded.insby(?); end;");
$sth->bind_param(1, 'test');
$sth->execute();
both worked for me.
See if you can get that example working and then build it up from there?
cheers
John Scoles
John Scoles wrote:
More a PL/SQL question than a DBI/DBD one but I will give it a shot
but I will need to have the original package or at least a dumbed
down version of it to test it out.
Seems it should work.
cheers
John Scoles
Eugene Krivdyuk wrote:
I'm trying to make a call of packaged stored procedure, e.g.:
=================== perl code ===================
$sSQL = q{
begin
package.function_name( :i_param1
, :i_param2
, :i_param3
, :o_param1
);
end;
};
$sth = $dbh->prepare($sSQL);
$sth->bind_param(':i_param1', 1);
$sth->bind_param(':i_param2', $sDateStart, { ora_type =>
ORA_VARCHAR2 });
$sth->bind_param(':i_param3', $sDateEnd, { ora_type =>
ORA_VARCHAR2 });
$sth->bind_param_inout( ':o_param1', \$iDaysCnt, 100000, { ora_type
=> ORA_NUMBER } );
$sth->execute;
=================== perl code ===================
function_name is an overloaded PL/SQL stored procedure, one accepts
i_param2 & i_param3 of type DATE, second accepts i_param2 & i_param3
of type VARCHAR2.
When executing code like above, I'm getting this error:
PLS-00307: too many declarations of 'function_name' match this call
Is there any way to make it work?