How do I find out which tables have changed (client) RRS feed

  • Question

  • I have a Sync Client and a Sync server, communication over WCF.

    When the client does a synchronisation, I would like to know which local tables have been updated.

    Is there a way I can get this information from the Agent?

    • Moved by Max Wang_1983 Friday, April 22, 2011 5:02 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, September 19, 2008 3:47 PM

All replies

  • During upload Sync, there is an event ChangesSelected that a client provider can subscribe.

    clientProvider.ChangesSelected += new EventHandler<ChangesSelectedEventArgs>(clientProvider_ChangesSelected);



    static void clientProvider_ChangesSelected(object sender, ChangesSelectedEventArgs e)

    you can see all tables that have been involved during change enumeration from





    Friday, September 19, 2008 7:00 PM
  • I have a problem doing the same on the ChangesApplied event. As I understand it, this is fired when changes have been downloaded from the server and applied to the local database. Context.DataSet should then contain the data that has been changed, right?

    However, the dataset property on Context is null when I do this. How come?
    Friday, September 19, 2008 9:13 PM
  • As I mentioned earlier, the sample code should help to find out the client side change during Upload phase (not download phase).  This is probably why you are not seeing anything from the Context.DataSet object.


    For Download, try to subscribe ApplyingChanges on the client provider.  Changes to be downloaded to the client should be contained in the e.Context.DataSet of the event (ApplyingChanges) handler,

    clientProvider_ApplyingChanges(object sender, ApplyingChangesEventArgs e).



    Monday, September 22, 2008 8:40 PM