Question : How do you tell if valid LOB indicator? ORA-22275

Hi All,
I got an error:
line 118 ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275

How do I tell if a valid LOB indicator exists before I get this error?
What if an empty_clob() was never inserted?

I think I was trying to insert Text/html/ that also had an image...  
How can I check to see that the user is only trying to save CLOB able data?
What if I changed to BLOB data - can the user edit the text?

Thank you,
BC

Answer : How do you tell if valid LOB indicator? ORA-22275

It depends on the package or function you use.  Some of them still need a lob locator as you saw in dbms_lob.write.

To just update a CLOB column, you typically don't need any special functions.  Now that I've said that, if the pBody variable contains a LOT of data, you might need to perform some special processing but I didn't see the need for that in the little bit of code you posted.

With every new release CLOBs are becoming more and more like varchar2.  I figure in 12g or 12gR2, you really won't be able to tell the difference.
Random Solutions  
 
programming4us programming4us