Hi I'm using 2.1 sync framework, syncing SQL CE 3.5 with SQL Server. It does inserts and deletes but doesn't do anything when I update data and do my upload. I suspect I've done something stupid when setting it up but don't know where to start looking. Can
anyone point me in the right direction of how to trouble shoot this. Here is my sync code.
// create a connection to the SyncCompactDB database
SqlCeConnection clientConn = new SqlCeConnection(GetSQLCEConnString());
// create a connection to the SyncDB server database
SqlConnection serverConn = new SqlConnection(GetSQLConnString());
// create the sync orhcestrator
SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
// set local provider of orchestrator to a CE sync provider associated with the
// ProductsScope in the SyncCompactDB compact client database
syncOrchestrator.LocalProvider = new SqlCeSyncProvider("StockScope", clientConn);
// set the remote provider of orchestrator to a server sync provider associated with
// the ProductsScope in the SyncDB server database
syncOrchestrator.RemoteProvider = new SqlSyncProvider("StockScope", serverConn);
// set the direction of sync session to Upload and Download
syncOrchestrator.Direction = SyncDirectionOrder.Upload;
// subscribe for errors that occur when applying changes to the client
((SqlCeSyncProvider)syncOrchestrator.LocalProvider).ApplyChangeFailed += new EventHandler<DbApplyChangeFailedEventArgs>(Program_ApplyChangeFailed);
// execute the synchronization process
SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();
// print statistics
MessageBox.Show("Synced");
Chris