locked
How to synchronize between a custom KnowledgeSyncProvider and a SqlSyncProvider? RRS feed

  • Question

  • So, i need to synchronize two data stores, one of which is a SQL database, and i felt it was natural to use the built in provider for that side. But unfortunately, I started running into trouble because the SqlSyncProvider doesn't use the ChnageDataRetriever and NotifyingChangeApplier, but instead communicates through some DbSyncContext object. Therefore, I had to derive from the SqlSyncProvider and override mainly the GetChangeBatch and ProcessChangeBatch methods so they become compatible with the rest of the Sync Framework.

    But the trouble is that I believe that I'm missing something in that transformation. The result is that when I create a row in a SQL database, and synchronize to the other store, and delete the row (or update) in the other store, after syncing the changes don't appear in the SQL database. The problem is probably caused by the bulkdelete stored procedure which filters the delete table and separates rows that are created locally from the rows created elsewhere.

    Does anybody know what could cause this problem? I would really like to see some samples or documentation regarding synchronization between a SQL provider and a custom provider.

    Monday, September 12, 2011 1:15 PM

All replies

  • Hi, have you succeeded with your project? I'm trying to manage a similar thing: on my LocalProvider enumerating changes retreived by SqlSyncProvider aka RemoteProvider, send them one by one to a custom WCF service and then need to send back RetryNextSync "flag" for some rows. Obviously I need my own ProcessChangeBatch with triggering ApplyChangeFailed based on my own logic. Could you help me with any example?

    Wednesday, May 30, 2012 6:09 PM