hi
I created a user-defined Oracle datatype:
CREATE OR REPLACE TYPE string_varray AS VARRAY(500) OF VARCHAR2(4000);
here's the stored procedure:
PROCEDURE save_multiple_values
(
array_values IN string_varray
);
How can I bind my user-defined type in Perl/DBI and pass the data to my stored procedure from a perl script?
@avals = qw(this is a test);
$sql = 'BEGIN my_package.save_multiple_values(:array_vals); END;';
my $stmt = $dbh->prepare ($sql);
$stmt->bind_param_array(":array_vals", \@avals);
$stmt->execute;
what I run my perl script, I get the following error:
DBD::Oracle::st bind_param_array failed: Can't use named placeholder ':array_vals' for non-driver supported bind_param_array [for Statement "BEGIN my_package.save_multiple_values(:array_vals); END;" with ParamValues: :array_vals=undef] at ./demo.pl line 58.
DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DBD ERROR: OCIStmtExecute) [for Statement "BEGIN my_package.save_multiple_values(:array_vals); END;" with ParamValues: :array_vals=undef] at ./demo.pl line 59.
I am using these versions:
DBD::Oracle::VERSION=1.16
DBI::VERSION=1.46
Thanks
--Andrew