Cached updates can be difficult to understand / diagnose, Marshal allows you to look at the dataset and database at the same time to understand what is pending and written to the actual database.
For this demo the form create event is used to start Marshal automatically. Here is the code:
uses dmMainComp, VCL.SE.RTTK.Marshal, //Reference to the Marshal Unit Vcl.Clipbrd; //used to copy query to clipboard {$R *.dfm} procedure TfrmCachedUpdates.FormCreate(Sender: TObject); begin inherited FormCreate(Sender); RegisterDS(qryProducts); TSERTTKWorker.ShowMarshal; //added to start Marshal end;
Start the demo sample Qry_CachedUpdates. Dock the Marshal form right and the query form left.