What I'm doing wrong (LOB-related)?

al0

Member²
Hi,

I have the following code

Code:
if not (LOBField.DataSet.State in [dsEdit,dsInsert]) then begin
  LOBField.DataSet.Edit;
  TMemoField(LOBField).LoadFromFile(odLOB.FileName);
   LOBField.DataSet.Post;
end;
If lob field is directly in the table then all is Ok, but if that field is a field of the object (e.g. field mumu.m.c in following example) :
Code:
create type tmum as object (x number, c clob);
create table mumu (y number, m tmum);
I receive the following error from the post method Invalid SQL statement.
Oracle monitor shows that text of that statement is empty. IS something wrong with my code or is it a DOA bug?

Thanks in advance.

)
 
Sems that problem lie in a procedure TOracleDataSet.CreateUpdate. If replace row

Code:
if (Col.InfoType = itField) and Col.FieldChanged and (Col.Field.FieldKind = fkData) then

with following

Code:
if (Col.InfoType in [itField,itAttr]) and Col.FieldChanged and (Col.Field.FieldKind = fkData) then

all seems to work.

Definitely, I am not sure if this change would not spoil some other functionality. so any comments are appreciated.
 
I would guess 1 or 2 weeks. If you send me an e-mail I can provide you with a pre-release as soon as this issue is addressed.
 
Originally posted by Marco Kalter:
I would guess 1 or 2 weeks. If you send me an e-mail I can provide you with a pre-release as soon as this issue is addressed.
Thank you. My fix work for my application so I may wait for new version patiently. But I have another question. How I can deal with collection-type fields? It more or less clear how to handle it if detailed dataset is linked to master dataset at design time (but, if I understand code in TOracleDataset correctly, it would work only on fields coming from UpdatingTable).

The problem is how to determine at run-time which fields of dataset sql query are of collection type? As those fields are absent from Fields property of datase as well as NestedDataSets?

Btw the code that deals with this task at design time shows all collection-type fields from UpdatingTable from dataset, regardless of their presence in query,
 
Back
Top