Hello,
I had some trouble with CLOB fields, and in the meanwhile I found a particular solution. Lets consider a TSmartQuery component having DMLRefresh=True and showing data from a query against a table like
CREATE TABLE INDEP
( ID NUMBER NOT NULL,
CL CLOB,
TXT VARCHAR2 (30));
ALTER TABLE INDEP ADD ( CONSTRAINT INDEP_PK PRIMARY KEY (ID))
It displays the result set in an InfoPower grid (www.woll2woll.com) that is able to display even clob values in its cells. If you edit a value from the TXT column without clicking any other cell before and then post the change, the value of the clob cell is blanked out. At first it looks like a problem of display only. Unfortunately the next edit/post cycle clears also the clob in the database.
Now I got a clue that the problem depends on the setting of TSmartQuery.DMLRefresh. That lead me to the TCustomSmartQuery.GetUpdateSQL function in OraSmart.pas line 1586. I changed it as follows and made my customer happy:
if not AFieldDesc.ReadOnly and not AFieldDesc.HasParent
and (FDMLRefresh and not (AFieldDesc.DataType in [dtMemo,dtBlob,dtOraBlob,dtOraClob,dtBFile,dtCFile])
In behalf of my problem it was sufficient to add dtOraClob. After looking at TOCIRecordSet.IsBlobFieldType(..) I decided to be safe and added all blob field types.
I am afraid you intended to make clob field values returnable too, because dtOraLob appears some lines below again. I am sure you will find a solution that considers that too.
Regards, Holger
PS.: TSmartquery properties are set as follows
SmartQuery1.DMLRefresh := True;
SmartQuery1.Lockmode := lmNone;
SmartQuery1.NonBlocking := True;
SmartQuery1.Options.CacheLobs := False;
SmartQuery1.Options.DeferredLobRead := True;
CLOB cell blanked out - problem report + particular solution
-
- Posts: 56
- Joined: Mon 08 Nov 2004 19:01
- Location: Germany
CLOB cell blanked out - problem report + particular solution
Last edited by heidenbluth on Thu 09 Dec 2004 15:43, edited 2 times in total.