Hi,

I'm using DBI 1.608, DBD::Oracle 1.23, OCI from 10.2.0.2. I'm trying to select 
a CLOB having prepared my select using ora_pers_lob = 1.  I've also got the 
following options set on my DB handle:

        LongReadLen   => 100 * 1024,      
        LongTruncOk    => 1,               
        ora_ph_type     => ORA_CHAR, # Default of VARCHAR2 strips whitespace

The result returned seems to be truncated at 64K no matter what I set 
LongReadLen to.  I went poking around in the oci8.c file which is part of 
DBD::Oracle and found a comment like:

/* very special case for binary lobs that are directly fetched. Seems I have to 
use SQLT_LVB to get the length all other will fail*/

I also see a comment in the DBD documentation: 
http://search.cpan.org/dist/DBD-Oracle/Oracle.pm#___top

"For CLOBs and NCLOBs the limit is 64k chars if there is no truncation,
this is an internal OCI limit complain to them if you want it changed.
However if you CLOB is longer than this and also larger than the
'LongReadLen' than the 'LongReadLen' in chars is returned."

The two comments above, taken together, make me suspect that simple CLOB 
handling via the data interface for persistent LOBs has some kind of historical 
baggage attached to it and today is still not fully supported/working within 
DBI/DBD (this is not the case for BLOBs though?).  Does that sound correct or 
am I missing something here to make this work for LOBs larger than 64K?

Thanks in advance for any hints and tips you might be able to provide.

Jim.





      

Reply via email to