if FDQuery1.State in dseditmodes then
fdquery1.Post;
if fdquery1.ChangeCount>0 then
begin
//showmessage('dfdfddfd');
fdmemtable1.Data:=fdquery1.Delta;
ierrors:=fdquery1.ApplyUpdates();
if ierrors=0 then
begin
fdquery1.CommitUpdates;
showmessage('good');
fdconnection1.Commit;
end;
end;