The t/long.t test script in the distribution tests with >>64KB strings.
Take a look at that.

Your bind_param_inout call is wrong. You're missing the maxlen param.

Tim.

On Thu, Dec 05, 2002 at 10:08:25PM +0100, Johann Kandlbauer wrote:
> Hi all,
> 
> we're trying to read Oracle 9.0.1/2 CLOBS which are larger than 32 kb using
> an unnamed PL/SQL block as data source. We always get the error ORA-06502
> which means 'Numeric or value error'. If the CLOB is smaller than 32 kb,
> everything goes ok.
> 
> It seems as if it is not possible to read more than 32 kb at once with
> DBI/DBD-Oracle.
> 
> DBD::Oracle::VERSION = '1.12';
> DBI Version: 1.30
> 
> Here is an extract of the code:
> ----snip-----
>   $csr = $dbh->prepare (q {
> declare
>   l_objecthandle  NUMBER;
>   l_objectData    CLOB;
>   l_object_type varchar2(20) := 'VIEW';
>   l_out varchar2(8196);
> BEGIN
>   l_objectHandle := DBMS_METADATA.OPEN(l_object_type);
>   DBMS_METADATA.SET_COUNT(l_objecthandle, 1000);
>   l_objectData := DBMS_METADATA.FETCH_CLOB(l_objecthandle);
>   DBMS_METADATA.CLOSE(l_objecthandle);
>   :text := l_objectData;
> END;
>                           }
>                        );
>   $csr->bind_param_inout (":text", \$text, { ora_type => ORA_BLOB });
>   $csr->execute();
> -----snap-----
> 
> Any suggestions how to solve this problem (without creating database tables
> to store intermediate results)?
> 
> thanks for your time.
> Johann Kandlbauer
> 
> GAMED mbH
> Harterstr.48
> A-8053 Graz
> AUSTRIA
> Tel +43 (316) 278 660-14
> Fax +43 (316) 278 660-10
> 
> http://www.gamed.com
> 

Reply via email to