Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Created December 14, 2017 11:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wellington1993/9860fa576e2f2866296469b6b6022371 to your computer and use it in GitHub Desktop.
Teste Apply Updates Return
procedure TForm1.BitBtn1Click(Sender: TObject); //apply updates button
var
i: integer;
begin
SimpleDataSet1.Edit;
SimpleDataSet1.FieldByName('SOME_FIELD').AsInteger := 1;
SimpleDataSet1.Post;
i := SimpleDataSet1.ApplyUpdates(-1);
if i <> 0 then
raise Exception.Create('Error count='+IntToStr(i)+' on ApplyUpdates occured');
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment