David,
My guess is that there is a problem with the type on the bind variable.
What happens if you remove the single quotes from the input value?
i.e.
$func->bind_param(":parameter1", 123456);
I recall from the dim past that Oracle sometimes does and sometimes does not
automatically convert datatypes for you. Since PL/SQL procedures/functions
can be overloaded, it's probably looking for and not finding the version of
COLLEGE.SPISFINANCIAL() which accepts varchar2 as input.
I think there is a way to explicitly specify datatype with bind_param, but
you'll have to read the docs for that (unless someone else on the list
volunteers the info).
-Chris
> -----Original Message-----
> From: David Bakkers [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 04, 2003 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: Newbie problem with Oracle functions
>
>
><snip>
> DECLARE
> RetVal NUMBER;
>
> BEGIN
> RetVal := COLLEGE.SPISFINANCIAL ( 123456 );
> END;
>
<snip>
> my $retval;
> eval {
> my $func = $dbh->prepare(q{
> BEGIN
> :retval := SPISFINANCIAL(
> parameter1_in => :parameter1
> );
> END;
> });
>
> $func->bind_param(":parameter1", '123456');
> $func->bind_param_inout(":retval", \$retval, 6);
> $func->execute;
> $dbh->commit;
> };
>
> if( $@ ) {
> warn "!! Execution of stored procedure failed!!\n$DBI::errstr\n";
> $dbh->rollback;
> }
>
> However, when I call $func->execute; DBD returns the error
> "DBD::Oracle::st
> execute failed." followed by "PLS00201: identifier
> 'COLLEGE.SPISFINANCIAL'
> must be declared"
>
LEGAL NOTICE:
Unless expressly stated otherwise, this message is confidential and may be privileged.
It is intended for the addressee(s) only. Access to this e-mail by anyone else is
unauthorized. If you are not an addressee, any disclosure or copying of the contents
or any action taken (or not taken) in reliance on it is unauthorized and may be
unlawful. If you are not an addressee, please inform the sender immediately.