archfool has asked for the wisdom of the Perl Monks concerning the following question:
(Why an object? Because OCI programming doesn't allow PL/SQL RECORD type. ;)CREATE OR REPLACE TYPE myObj AS OBJECT ( Col1 number, Col2 varchar(2), Col3 timestamp, ... Col57 number );
And now here's what I'd LIKE to run. Is anything like this possible? I need to call a package function that takes IN this object. How can I bind perl variables to the PL/SQL object? I'm using PL/SQL to get at a package/function in the database. This function does post-processing on the object (which really just represents a row of data). We're all trying to avoid 57 bind variables. :)
My main question is... how do I bind a list or hash to :in_row in the $dbh->bind_param(":in_row", \%hash, ...);my $sql = " DECLARE in_row myObj; retcode number; BEGIN :retcode := Otherpackage.Function(:in_row); END; "; my $sth = $dbh->prepare($sql) ...
-ArchFool
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Objects in PL/SQL in DBD::Oracle
by andreas1234567 (Vicar) on Jun 21, 2007 at 06:28 UTC | |
by archfool (Monk) on Jun 21, 2007 at 14:10 UTC |