Billy has asked for the wisdom of the Perl Monks concerning the following question:
PROCEDURE validate_user ( p_event IN EVENT, p_user IN valid_users.userid%TYPE, p_password_only IN boolean, v_return_string OUT VARCHAR2)
#!/usr/bin/perl use DBI; $ENV{'ORACLE_HOME'} = '/space/oracle/app/oracle/product/8.1.5'; my $dbh = DBI->connect('my dsn',"bla bla","bla bla") or die("Can't con +nect to Oracle database: $DBI::errstr\n"); my $sql = "BEGIN campaign.validate_user(?, ?, ?, ?); END;"; my $sth = $dbh->prepare($sql); $sth->bind_param(1, 'V2001'); $sth->bind_param(2, 'billy'); $sth->bind_param(3, TRUE); my $error_string; my $return_code; $sth->bind_param_inout(4, \$return_code,1000); $sth->execute() or die("Execution error: $DBI::errstr\n"); print $error_string." : ".$return_code."\n"; $dbh->disconnect;
DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'VALIDATE_USE +R' ORA-06550: line 1, column 7: PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute) at ./nmsd.pl lin +e 27. Execution error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'VALIDATE_USE +R' ORA-06550: line 1, column 7: PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing boolean value to PLSQL procedure
by agoth (Chaplain) on Jul 10, 2001 at 15:33 UTC | |
by Billy (Novice) on Jul 10, 2001 at 16:10 UTC | |
by agoth (Chaplain) on Jul 10, 2001 at 16:26 UTC | |
by Billy (Novice) on Jul 10, 2001 at 16:53 UTC |