Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Oracle 8 and writing Data to a LOB (blob/clob) field.


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)

    Table .Insert; Table KEYFLD.AsInteger := new_val; Table TESTFLD.LoadFromFile('D:\data\test.bmp'); Table .Post; change it to

    Database .StartTransaction; Table .Insert; Table KEYFLD.AsInteger := new_val; Table TESTFLD.LoadFromFile('D:\data\test.bmp'); Table .Post; Database .Commit;

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

    3/26/99 0:5 :08 AM

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use