DBI: ist it possible to get an Oracle VARRAY als Return Value from a PL/SQL call

From: oli (olivier6_at_gmx.ch)
Date: 01/28/04


Date: 28 Jan 2004 08:57:58 -0800

Hello,

I try to get a return value from an Oracle PL/SQL procedure. This
version works, the return value from PL/SQL is a VARCHAR2:

my $returnValue; # Return value from PLSQL
eval {
   my $plsql = $dbh -> prepare (
      qq {
         BEGIN
            :returnValue := steuerung_pkg.get_filenames_fct (
                              name_in => :p_name,
                              periodizitaet_in => :p_periodizitaet);
         END;
      } );

      $plsql -> bind_param (":p_name", 'reservation');
      $plsql -> bind_param (":p_periodizitaet", 'day');
      $plsql -> bind_param_inout (":returnValue", \$returnValue, 125);
      $plsql -> execute;
};

if ( $@ ) {
   warn "Execution from steuerung_pkg.get_filenames_fct false;
$DBI::errstr\n";
}
else
{print "PLSQL ok returnValue is: $returnValue\n";}

New, I would like to return a VARRAY from PL/SQL (without converting
it in a string with delimiter before returning). How can I do that ?

Thank you.

Olivier



Relevant Pages

  • Re: PlSql usage
    ... I have some knowledge in PlSql, but I do not know where exactly this ... all necessary SQL statements that perform a logical business function ... In general you resort to using PL/SQL only where you cannot perform ... you need to use Oracle object types though with the ...
    (comp.databases.oracle.misc)
  • Re: VARCHAR2 Length
    ... need to declare a variable longer than 4000, ... need to declare a variable and continue to concatenate strings onto it ... In PL/SQL max length of VARCHAR2 is much longer than in SQL. ...
    (comp.databases.oracle.misc)
  • Need Help!! oci8lib.so: ORA-06550 error..
    ... wrong number or types of arguments in call to 'tax' ... PL/SQL: Statement ignored from ...
    (comp.lang.ruby)
  • Re: Why use Java Stored Procedures....
    ... pros and cons of using Java for my stored proedures instead of PLSQL. ... "If you cannot do it in PL/SQL only then do it in Java". ...
    (comp.databases.oracle.server)