locked
Conflict Resolution in SQL Express using Microsoft sync framework RRS feed

  • Question

  •   I am using Sync Framework 2.0 for Synchronizing SQL Server 2005 and SQL Express database.
    I need to implement the conflict resolution logic for the same.
    I am trying to find out the equivalent of "ConflictResolver" property in "SQLCeClientSyncProvider" in SQLServer2005 /SQLExpress
    I have found out a sample at :
    But sample doesnot give any implementation for conflict resolution.
    Please guide me for handling conflict resolution in case of SQLServer2005 and SQLExpress synchronization.
     
    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:27 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Sunday, November 15, 2009 7:09 AM

Answers

  • The SQLExpress provider is sample provider that does not support "ConflictResolver".  You can use the recommended  standard way of handling conflicts  in ApplyChangeFailed callback. Please refer to the link below.

    http://msdn.microsoft.com/en-us/library/bb725997.aspx

    Thanks
    Jandeep
    jandeepc
    Thursday, November 19, 2009 9:08 PM
  • Please start with the overview here.
    Then use the sample - C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Samples\SharingAppDemo-CEProviderEndToEnd - that comes with the SDK. However the sample syncs between SQL Server to Compact client. However the pattern of usage is not very different.

    This posting is provided AS IS with no warranties, and confers no rights
    • Marked as answer by transpacific Thursday, December 3, 2009 3:58 AM
    Tuesday, December 1, 2009 1:06 AM

All replies

  • Hi ,
     What provider are you using for SqlExpress client?

    thanks
    Jandeep
    jandeepc
    Wednesday, November 18, 2009 7:31 PM
  • The SQLExpress provider is sample provider that does not support "ConflictResolver".  You can use the recommended  standard way of handling conflicts  in ApplyChangeFailed callback. Please refer to the link below.

    http://msdn.microsoft.com/en-us/library/bb725997.aspx

    Thanks
    Jandeep
    jandeepc
    Thursday, November 19, 2009 9:08 PM
  • Hi Jandeep

    Thanks for the help
    I am trying to implement "last writer wins" and don't understand how to implement this policy
    Sync 2.0 has this conflict resolution any sample code will greatly help
    Thanks
    Prashant
    Tuesday, November 24, 2009 12:02 PM
  • How to handle/set conflict resolver with SqlClientSyncProvider.

    What is the default ResolveAction when we use sqlclientsyncprovider and how to change it.

    Can we user SqlCeProvider to interact with sql express edition as client database.

    Thursday, November 26, 2009 3:20 PM
  • How to handle/set conflict resolver with SqlClientSyncProvider.

    What is the default ResolveAction when we use sqlclientsyncprovider and how to change it.

    Can we user SqlCeProvider to interact with sql express edition as client database.

    Thursday, November 26, 2009 3:20 PM
  • Firstly I am hoping that you are using SqlSyncProvider to sync your Server database with your client Express database.

    And as described in this link, you can obtain the 2 datasets and select your own custom resolution.
    This posting is provided AS IS with no warranties, and confers no rights
    Friday, November 27, 2009 5:06 AM
  • Firstly I am hoping that you are using SqlSyncProvider to sync your Server database with your client Express database.

    And as described in this link , you can obtain the 2 datasets and select your own custom resolution.
    This posting is provided AS IS with no warranties, and confers no rights
    Hi

    Thanks
    yes we do use sqlsyncprovider; any code sample or can you please elaborate

    Thanks
    Friday, November 27, 2009 11:41 AM
  • I am using sqlclientprovider and sqldbprovider to sync sqlexpress client data with sqlserver database provided in sample .
     
    here i couldn't find how to handle dataconflict. 
     
    in the sample they have defined event handlers for confilct.these events are not firing when we update the record and sync from client to server or server to client
    Friday, November 27, 2009 12:27 PM
  • Hi,

    From what you describe, you seem to be using the sample provider for SQL express. As posted earlier, I highly encourage you to please use the SqlSyncProvider that ships as part of Microsoft Sync Framework 2.0 Database providers (SDK and redists) as the Server and client providers. The previously posted express client was just a sample that was not complete in its feature set, was posted as a stop gap solution. The recently shipped provider that I mention above has been tested to run fine against the express clients and supports conflicts and is a supported version of the provider.

    It looks like apart from you a few others are also using SQL Express as the client and basing it off of the sample. The sample was posted a while back and now we have a provider that works for SQL Express too. So as I mentioned above, please use this provider to sync your SQL Express clients.

    Mahesh
    This posting is provided AS IS with no warranties, and confers no rights
    Saturday, November 28, 2009 6:33 AM
  • Hi Mahesh

    is it possible for you to provide us the sample code

    Thanks
    Prashant
    Monday, November 30, 2009 7:38 AM
  • Please start with the overview here.
    Then use the sample - C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Samples\SharingAppDemo-CEProviderEndToEnd - that comes with the SDK. However the sample syncs between SQL Server to Compact client. However the pattern of usage is not very different.

    This posting is provided AS IS with no warranties, and confers no rights
    • Marked as answer by transpacific Thursday, December 3, 2009 3:58 AM
    Tuesday, December 1, 2009 1:06 AM
  • Yes Mahesh Its working fine Thanks
    Prashant
    Thursday, December 3, 2009 3:58 AM