2009-03-30 24 views
0

クライアント側の競合をado.netの同期サービスで解決することは可能ですか?例えば 、クライアントインサートサーバーインサートと、(クライアント側)クライアントのテーブルIDを更新し、TKS同期サービスAdo.netの競合の解決

答えて

0

あなたが行うことができますサーバー側の間:

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   

あなたがクライアント上でこれを行うカントが、適用する変更イベントをインターセプトして、次のような適切な処置をとることができます。

Partial Public Class NorthwindCacheClientSyncProvider 
    Private Sub ApplyingChangesEvent(…) Handles Me.ApplyingChanges 
     Dim clientChanges As DataSet = e.Changes 
関連する問題