EF 6.2 string to Oracle DB CLOB error - ORA-22275

17 Views Asked by At

for some time I got an issue while inserting object with string that goes into CLOB column in ORA DB I get an error:

ORA-22275: invalid LOB locator specified

It worked for past few years but now it suddenly stopped... Any ideas why?

1

There are 1 best solutions below

0
Zamash On

Ok, I've not provided any code because it was a simple operation. I have an entity with a string column with a DataType of CLOB on the database side. I performed a simple operation like:

entity.text = "blah blah blah...";
context.Table.Add(entity); 
context.SaveChanges();.

Now I partially understand the issue. The length byte limit of this CLOB is 4000, and we're attempting to insert larger strings into it. However, the limit wasn't 4000 bytes. We can find many records in that table/column that exceed that limit by three times or even more.

Any ideas why that property was changed or wasn't respected before?