ORA-22835 updating CLOB fields

ORA-22835 updating CLOB fields

Postby malea » Fri 25 Jan 2013 09:09

Hi,

First of all, sorry for my english.

I have installed latest trial version of dotConnect for Oracle Professional (7.5.164), for testing it before purchasing.

Till now, I was using version 5.70 in a test project without problems.

I have some tables in my database with CLOB fields, and after updating to 7.5 version, when I try to modify any of this fields, I obtain this error:

"ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 169397, maximum: 4000)".

I obtain the object first with a select.
Then I modify the CLOB field. And when I do "context.submitchanges" is when I obtain this error.

An example:

Code: Select all
using (var context = new Contexto())
{
    //XX is the table and I'm searching by user id.
    var obj = context.XX.Single(x => x.USER == "TEST");
   
    //XML is the CLOB field mapped as string. stream is type of MemoryStream.
    obj.XML = Encoding.UTF8.GetString(stream.ToArray());
   
    //It's here where my test app crashes.
    context.SubmitChanges();
}


I have looked for information but until now I haven't find a solution.
This code worked perfectly with version 5.70.
Could you help me?
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: ORA-22835 updating CLOB fields

Postby MariiaI » Mon 28 Jan 2013 10:43

Since dotConnect for Oracle 7.2.96 the conversion of CLOB to CHAR is added for CLOB columns, that are involved in update checks, for proper change tracking. Thus, this issue occurs because the conversion of CLOB to CHAR is performed and the LOB size is bigger than the buffer limit for the CHAR type (http://www.dbmotive.com/ora-22835-buffer-too-small-for-clob-to-char-or-blob-to-raw-conversion-actual-s-maximum-s/).

To avoid this, please set 'Update Check' for the 'XML' property to 'Never'.
Please tell us if this helps.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ORA-22835 updating CLOB fields

Postby malea » Fri 19 Apr 2013 07:45

It works perfect!

Sorry for the delay.

Thank's
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25


Return to dotConnect for Oracle