var
 Save: Integer;

begin
 if StudInfo.State = dsEdit then
  begin
    Save := Application.MessageBox('Zapisa zmiany?', 'Potwierd', MB_YESNO);
    if Save = idYes then
      StudInfo.Post   {zatwierd zmiany}
    else
      StudInfo.Cancel {anuluj zmiany}
  end
 else
  Application.MessageBox('Tabela nie jest w stanie dsEdit','Bd',MB_OK);
end;