hello all,
I have a project that sync the client and the server. i'm using northwind database and customer table for testing purpose.
here is the case.
SERVER SIDE:
Record 001 - Company Name changed
CLIENT SIDE:
Record 001 -Contact Name changed.
when I sync, the company Name changes updated in Client side, but Contact name changes made on the client side never updated on the server.
I created the code below to detect the conflict and get the changes in the client side and server:
can you guys please give me some suggestion on how to the apply the this business rule to this scenario?HTML Code:Partial Public ClassNorthwindCache1ServerSyncProvider Private Sub NorthwindCacheServerSyncProvider_ApplyChangeFailed( _ ByVal sender As Object, ByVal e As Microsoft.Synchronization.Data.ApplyChangeFailedEventArgs) Handles Me.ApplyChangeFailed If e.Conflict.ConflictType = Microsoft.Synchronization.Data.ConflictType.ClientUpdateServerUpdate Then Dim ClientChanges As DataTable = e.Conflict.ClientChange Dim ServerChanges As DataTable = e.Conflict.ServerChange 'if I will issue the command below e.Action = Microsoft.Synchronization.Data.ApplyAction.RetryWithForceWrite ' Client side will win and what will happen the changes made on the same record on the server side will not be updated to client side. End If End Sub




Reply With Quote