Master Detail and CachedUpdates lazarus / 16-Databases ---------------------------------------------------------------------- mizar · 2015-07-21 11:45 In a form I have a Master/Detail relationship using 2 ZQuery (linked the usual way, i.e. Detail.DataSource:= Master.DS) having CachedUpdates set to true to let the user modify data and then, clicking a "Save" button, committ all to the db with a unique transaction: Code: [Select]  Zconn1.AutoCommitt:= true;   Zconn1.StartTransaction;   ZqryDetail.ApplyUpdates;   // ZqryDetail.CommittUpdates;   ZqryMaster.ApplyUpdates;   // ZqryMaster.CommittUpdates;   Zconn1.Committ; Problems arise after having edited some fields, both Master's as Detail's ones, when Master posts, Detail's query is refreshed from db losing all modified data in the Detail cache (even if you had previously posted to cache all detail's records). Any workarounds, solutions ? TIA (fpc 3.0.1, lazarus svn 49556M, zeos 7.2.0 beta) ---------------------------------------------------------------------- LacaK · 2015-07-22 06:45 I do not use ZEOS components. But I have had similar problem with IBX components under Delphi. IIRC I have used :   TDataSet.DisableControls;   ... // here post updates   TDataSet.EnableControls; Which causes, that detail dataset is not refreshed after updates are applied in master .