I've also found out, that DBD::Oracle does not support type SQL_REF:
When not using DBD::Proxy I get:
SQL type 20 for ':p1' is not fully supported,
bound as SQL_VARCHAR instead
I even get segmentation faults when trying to fetch REF columns. :-(
Any ideas?
> Hi,
>
> I'm trying to bind a perl variable to an Oracle table reference with
> Oracle 9.2.0.3, DBD::Proxy and Perl::DBI 1.37 without success. I
> could'nt find help on this in the docs or list archives. I hope this is
> the right place to post.
>
> In SQL*Plus:
>
> SQL> desc getReference
> FUNCTION getReference RETURNS REF OF TABLETYPE
>
> SQL> select getReference() from dual;
>
> GETREFERENCE()
> ----------------------------------------------------------------------
> 0000280209C229D2216EF6A5F4E030010A8D086AD3C204FC6EE0E46501E030010A8D08
> 2CE703C0000E0000
>
>
> My code:
>
> my $ref = undef;
> my $sth = $dbh->prepare('BEGIN ? := getReference(); END;');
> $sth->bind_param_inout(1, \$ref, 128, SQL_REF );
> $sth->execute();
>
> yields:
>
> PLS-00382: expression is of wrong type
>
>
> Even fetching a reference does not work:
>
> my $sth = $dbh->prepare('SELECT getReference() FROM DUAL');
> $sth->execute();
> ($ref) = $sth->fetchrow_array();
>
> yields undef in $ref.
>
> I'd very much appreciate your help.
> cheers,
> Hendrik