Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    6

    Unanswered: binding a user-defined Oracle type...

    hi

    I created a user-defined Oracle datatype:

    Code:
      CREATE OR REPLACE TYPE string_varray AS VARRAY(500) OF VARCHAR2(4000);
    here's the stored procedure:

    Code:
      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?

    Code:
      @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:

    Code:
    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:

    Code:
    DBD::Oracle::VERSION=1.16
    DBI::VERSION=1.46
    Thanks
    --Andrew

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •