Oracle Memo Fields In Delphi 4

I'm trying to set values to Oracle 8 CLOB Fields (TMemoFields) From Delphi 4 Code and when I'm trying to do i get Exception : "LOB Locators cannot span transaction"
Does anybody knows what it is? how can I overcome this problem? Should I use other type of field in Oracle 8 for TMemoField use?

Thanks, Assaf.
Who is Participating?
kretzschmarConnect With a Mentor Commented:
hi assafk,

from inprise

Question and Answer Database

     FAQ4235B.txt - Oracle 8 and writing Data to a LOB (blob/clob) field.

     Category   :Database(Oracle8)
     Platform   :Win95/NT
     Product    :Delphi4.x,  

     I am using Oracle 8.0.4 as my database backend and when I attempt to write data
     to a Blob/Clob field I keep getting the error "ORA-22990: LOB locators cannot span
     transactions".  The code I am using used to work against Oracle 7 servers but against
     Oracle 8 it keeps raising this error.  What is wrong?

     As of Oracle 8, Oracle mandates that in order to write data to a LOB datatype ( Blobs and
     Clobs are subtypes of the LOB type) that you must be in a transaction.  this is due to the
     changes in the way oracle implemented the LOB data type. To get around this issue start a
     transaction before you attempt to write data to a LOB data type.

     for example if your code was (Delphi example)

     Table1KEYFLD.AsInteger := new_val;
     change it to

     Table1KEYFLD.AsInteger := new_val;

     and this will get you around the issue.
     For more information on LOB data types see the Oracle 8 documentation.

     3/26/99 10:51:08 AM

good luck

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.