is it possible to solve conflicts on client side with sync services for ado.net? for example, with Client Insert Server Insert, updating client's table id (on client side) , tks
A:
While on the server side you can do:
Partial Public Class NorthwindCacheServerSyncProvider
Private Sub ApplyChangeFailedEvent(…) Handles Me.ApplyChangeFailed
Dim clientChanges As DataTable = e.Conflict.ClientChange
Dim serverChanges As DataTable = e.Conflict.ServerChange
' Code to resolve conflict
If (clientChanges.Rows(0)("ModifiedDate") > _
serverChanges.Rows(0)("ModifiedDate") Then e.Action = ApplyAction.RetryWithForceWrite
End If
You cant do this on the client, but, you can intercept the applying changes event and take appropriate action, like this...
Partial Public Class NorthwindCacheClientSyncProvider
Private Sub ApplyingChangesEvent(…) Handles Me.ApplyingChanges
Dim clientChanges As DataSet = e.Changes
JohnnyJP
2010-02-13 21:25:15