Master + Detail CachedUpdates Problem

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
arch-vile
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 18.01.2007, 04:33
Location: Jakarta
Contact:

Master + Detail CachedUpdates Problem

Post by arch-vile »

Hello..

This is a first time i using CachedUpdates=True in my program. :)
Now i try make master - detail program with TZQuery..
Master : beli
Detail : beli_item
DM : DataModule

I have a problem when click save button. Data on detail dataset never post to database. below is a quoting my code :

try
DM.ZConnection.StartTransaction;
if beli.UpdatesPending or beli_item.UpdatesPending then
begin
beli.ApplyUpdates;
beli_item.ApplyUpdates;
end;
DM.ZConnection.Commit;
beli.CommitUpdates;
beli_item.CommitUpdates;
except
DM.ZConnection.Rollback;
if beli_item.UpdatesPending then beli_item.CancelUpdates;
if beli.UpdatesPending then beli.CancelUpdates;
raise;
end;

Any clue?

fyi: I used Delphi 7+Zeos.6.6.0-beta+MySQL 4.1.9

thx..
arifin
casanova_frank
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.06.2006, 03:37

Post by casanova_frank »

How do you assign data to the fields? DB-Aware controls or code?
Are you calling Post somewhere before ApplyUpdates?
Post Reply