Page 1 of 1

Problem with CachedUpdates

Posted: Fri 10 Oct 2008 14:50
by mufalo
Hello,

In IBDAC and ODAC, when a TxxxQuery have CachedUpdates=True then Fields of joined tables can have updateded.
Example:

SelectSQL:
select T1.FIELD1, T1.FIELD2, T2.FIELD3
from T1
join T2 on T1.FIELD1 = T2.FIELD1;

UpdateSQL:
update T1 set
FIELD2 = :FIELD2
where FIELD1= :FIELD1

txxxQuery1.Edit;
txxxQuery1.FieldByName('FIELD1').AsInteger:=1;
txxxQuery1.FieldByName('FIELD2').AsInteger:=2;
txxxQuery1.FieldByName('FIELD3').AsInteger:=3;
txxxQuery1.Post;

In ODAC and IBDAC this works, but in UniDAC, I Have the error:
Field 'FIELD3' cannot be modified.

I wan´t to use UniDAC as I use IBDAC and ODAC.

Posted: Mon 13 Oct 2008 07:45
by Plash
Set the SetFieldsReadOnly option of TUniQuery to False.

Posted: Mon 13 Oct 2008 16:42
by mufalo
It´s works..
thanks.