James Hooker wrote:
Thanks for the info John.

The following statement is the part confusing me:

"However if you CLOB is longer than this and also larger than the 'LongReadLen' than the 'LongReadLen' in chars is returned."

Funny thing took me a while to figure this one out at well. Has to do with NLS settings between the client and the DB. The OCI call for N/Clobs in OCI (what DBD::oracle is uses) will return either

1) the number of bytes or
If the NLS settings of you client and data do not match the NLS settings of the DB then translation will take place so it is the number of Bytes returned.

2) the number of characters
If the NLS setting of you client and data match the NLS settings of the DB then there is no translation so it is the number of Characters returned.

There is no way to know before hand if it will be characters or Bytes returned unless you know the DB to client before hand.

In 1.24 I added the ora_ncs_buff_mtpl param http://search.cpan.org/~pythian/DBD-Oracle-1.24a/Oracle.pm#Using_ora_ncs_buff_mtpl so you can set this value yourself so you will know exactly what you would expect to get back.

The ora_ncs_buff_mtpl was a way to cut down on memory use as asking for 64k would use 256k of memory.

Cheers John Scoles

For my example the CLOB is longer than LongReadLen (which in turn is longer than 64K). So according to the statement above I should get LongReadLen back in chars. Still no joy though.
On 20 Apr 2010, at 12:03, John Scoles <sco...@pythian.com <mailto:sco...@pythian.com>> wrote:

However if you CLOB is longer than this and also larger than the 'LongReadLen' than the 'LongReadLen' in chars is returned.


Reply via email to