Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle Memo Fields In Delphi 4

Posted on 1999-07-21
1
Medium Priority
?
1,082 Views
Last Modified: 2008-03-06
I'm trying to set values to Oracle 8 CLOB Fields (TMemoFields) From Delphi 4 Code and when I'm trying to do TTable.post 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.
0
Comment
Question by:assafk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 800 total points
ID: 1390170
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,  

     Question:
     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?

     Answer:
     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)

     Table1.Insert;
     Table1KEYFLD.AsInteger := new_val;
     Table1TESTFLD.LoadFromFile('D:\data\test.bmp');
     Table1.Post;
       
     change it to

     Database1.StartTransaction;
     Table1.Insert;
     Table1KEYFLD.AsInteger := new_val;
     Table1TESTFLD.LoadFromFile('D:\data\test.bmp');
     Table1.Post;
     Database1.Commit;

     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

meikl
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question