title: Synchronize DataSet
body: <p>What is the best approach to synchronizing a DataSet with data in a database? Here are the parameters: </p>
  
  <ul>
  <li>We can't simply reload the data because it's bound to a UI control which a user may have configured (it's a tree grid that they may expand/collapse)</li>
  <li>We can't use a changeflag (like a UpdatedTimeStamp) in the database because changes don't always flow through the application (e.g. a DBA could update a field with a SQL statement)</li>
  <li>We cannot use an update trigger in the database because it's a multi-user system</li>
  <li>We are using ADO.NET DataSets</li>
  <li>Multiple fields can change of a given row</li>
  </ul>
  
  <p>I've looked at the DataSet's Merge capability, but this doesn't seem to keep the notion of an "ID" column.  I've looked at DiffGram capability but the issue here is those seem to be generated from changes within the same DataSet rather than changes that occured on some external data source.</p>
  
  <p>I've been running from this solution for a while but the approach I know would work (with a lot of ineffeciency) is to build a separate DataSet and then iterate all rows applying changes, field by field, to the DataSet on which it is bound. </p>
  
  <p>Has anyone had a similar scenario? What did you do to solve the problem? Even if you haven't run into a similar problem, any recommendation for a solution is appreciated.</p>
  
  <p>Thanks</p>