Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> return CLOB via Perl/DBI

return CLOB via Perl/DBI

From: Ken Chesak <datavector_at_hotmail.com>
Date: 24 Jun 2003 13:53:52 -0700
Message-ID: <3f2f39c4.0306241253.6c384dc6@posting.google.com>


Oracle 8.1.7, Perl 5.004_04 , DBI 1.13

Does someone have a working code sample of Perl/DBI returning a CLOB column from Oracle. Here is what I came up with, I counld not get ORA_CLOB to work.

$sth1 = $dbh->prepare(q{

               BEGIN OPEN :cursor FOR
               SELECT dbms_lob.substr( comments, 30000, 1)
               FROM comments WHERE id_comment = 46;
                END;
       });

       $sth1->bind_param_inout(":cursor", \$sth2,  30000, {  ora_type 

=> ORA_RS

ET } );

       $sth1->execute();

       while ( @row = $sth2->fetchrow ) {
                print "row = @row\n";
        }

Thanks Received on Tue Jun 24 2003 - 15:53:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US