I have a SQL Express DB as local server & SQL Server DB as remote server. I am using SyncOrchestrator sync Agent for Conflict Resolution. whehever there is a conflict, i want to store it, so that later on i get all the conflicts and resolve one by one. But ApplyAction enumeration doesn't have any value like 'SkipChange' or 'Defer'.
Please Guide.
the code is pasted below.
private void btnSync_Click(object sender, RoutedEventArgs e) { SqlConnection clientConn = new SqlConnection(connectionstring1);
SqlConnection serverConn = new SqlConnection(connectionstring2);
// create the sync orhcestrator
SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
SqlSyncProvider localProvider = new SqlSyncProvider("Scope1", clientConn);
SqlSyncProvider remoteProvider = new SqlSyncProvider("Scope2", serverConn);
// set local provider of orchestrator to a sync provider associated with the
// ProductsScope in the SyncExpressDB express client database
syncOrchestrator.LocalProvider = localProvider;
// set the remote provider of orchestrator to a server sync provider associated with
// the ProductsScope in the SyncDB server database
syncOrchestrator.RemoteProvider = remoteProvider;
// set the direction of sync session to Upload and Download
syncOrchestrator.Direction = SyncDirectionOrder.DownloadAndUpload;
// subscribe for errors that occur when applying changes to the client
((SqlSyncProvider)syncOrchestrator.LocalProvider).ApplyChangeFailed += new EventHandler<DbApplyChangeFailedEventArgs>(Program_ApplyChangeFailed);
// execute the synchronization process
SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();
MessageBox.Show("Synchronization of Table1 Completed");
BindClientTables();
BindServerTables();
}
private void btnServerData_Click(object sender, RoutedEventArgs e)
{
BindServerTables();
}
private void btnClientData_Click(object sender, RoutedEventArgs e)
{
BindClientTables();
}
static void Program_ApplyChangeFailed(object sender, DbApplyChangeFailedEventArgs e)
{
"**Here I want to defer the Resolution for future.**"
}