title: Auto refresh a TDataSet / DBGrid
body: <p>I'm developing a software that displays information in a <code>DBGrid</code> via a <code>TSimpleDataSet</code> (dbExpress components)</p>
  
  <p>The software in question is used on 2 different computers by 2 different people.</p>
  
  <p>They both view and edit the same information at different times.
  I'm trying to figure out a way to automatically update the <code>DBGrid</code> (or rather, the <code>DataSet</code>, right?) on Computer B once Computer A makes a change to a row (edits something/whatever) and vice-versa.</p>
  
  <p>Currently I've set up a <code>TButton</code> named <code>Refresh</code> that once clicked executes the following code:</p>
  
  <pre><code>procedure TForm2.actRefreshDataExecute(Sender: TObject);
  
  begin
      dbmodule.somenameDataSet.MergeChangeLog;
      dbmodule.somenameDataSet.ApplyUpdates(-1);
      dbmodule.somenameDataSet.Refresh;
      dbmodule.somename1DataSet.MergeChangeLog;
      dbmodule.somename1DataSet.ApplyUpdates(-1);
      dbmodule.somename1DataSet.Refresh;
      dbmodule.somename2DataSet.MergeChangeLog;
      dbmodule.somename2DataSet.ApplyUpdates(-1);
      dbmodule.somename2DataSet.Refresh;
      dbmodule.somename3DataSet.MergeChangeLog;
      dbmodule.somename3DataSet.ApplyUpdates(-1);
      dbmodule.somename3DataSet.Refresh;
  end;
  </code></pre>
  
  <p>This is fine and works as intended, once clicked. 
  I'd like an auto update feature for this, for example when Computer A edits information in a row, Computer B's <code>DBGrid</code> should update it's display accordingly, without the need to click the refresh button.</p>
  
  <p>I figured I would use a <code>TTimer</code> and set it at a specific interval, on both software on both PC's.</p>
  
  <p><strong>My actual question is:</strong></p>
  
  <p>Is there a better way than a <code>TTimer</code> for this? If so, please elaborate.
  Also, if the <code>TTimer</code> route is the way to go any further info you might find useful to state would be appreciated (pro's and con's and so on)</p>
  
  <p>I'm using Rad Studio 10 Seattle and <code>dbExpress</code> components, the datasets connect to a MySQL database on my hosting where my website is. </p>
  
  <p>Thanks!</p>