Problem with CachedUpdates

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mufalo
Posts: 15
Joined: Mon 21 Nov 2005 18:00

Problem with CachedUpdates

Post by mufalo » Fri 10 Oct 2008 14:50

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 13 Oct 2008 07:45

Set the SetFieldsReadOnly option of TUniQuery to False.

mufalo
Posts: 15
Joined: Mon 21 Nov 2005 18:00

Post by mufalo » Mon 13 Oct 2008 16:42

It´s works..
thanks.

Post Reply