Здравствуйте, intaari, Вы писали:
I>Если не трудно напишите вашу версию кода. На другом форуме мне советовали Post а затем ApplyUpdates.
Ну дык Post то надо вызывать у редактируемого набора. И лучше, если это будет CheckBrowseMode, а не Post. А на счет кода. Вы так в хелп и не хотите заглянуть?! От туда:
procedure TForm1.ApplyButtonClick(Sender: TObject);
begin
with CustomerQuery do
begin
Database1.StartTransaction;
try
ApplyUpdates; {try to write the updates to the database};
Database1.Commit; {on success, commit the changes};
except
Database1.Rollback; {on failure, undo the changes};
raise; {raise the exception to prevent a call to CommitUpdates!}
end;
CommitUpdates; {on success, clear the cache}
end;
end;