Sunday, February 15, 2009 6:52 PMhttp://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=1200
this example seems to work for SQL 2008 to an other version but not using Integrated change tracking
I want to work with Change tracking between 2 SQL 2008 databases.
I've tried to edit the code example, but i'm stuck
look at folowing code
It uses the SqlExpressClientSyncProvider, wich i don't want to uses, they write Change Tracking manually in it.(use guid, anchor table...)
So i tried to assign a DBServerSyncProvider & DBSyncProvider to the clientSyncProvider variable
but the problem is syncAgent.LocalProvider requires a clientSyncProvider wich is an abstract class..
anyone knows how you fix the code to work with Change Tracking on both sides?
- Moved by Hengzhe Li Friday, April 22, 2011 3:17 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
Thursday, February 19, 2009 1:31 PMIt's done when you create your sync table adapters:
SyncTablesyncTable = new SyncTable("MyTableName");
syncTable.CreationOption = TableCreationOption...;
syncTable.SyncDirection = SyncDirection...;
SqlConnection conn = (serverSyncProviderConnection);
SqlSyncAdapterBuilder serverTableAdapterBuilder = new SqlSyncAdapterBuilder(conn);
serverTableAdapterBuilder.TableName = "MyTableName";
serverTableAdapterBuilder.ChangeTrackingType = ChangeTrackingType.SqlServerChangeTracking;
serverTableAdapterBuilder.SyncDirection = entity.SyncDirection;
SyncAdapter syncServerAdapter = serverTableAdapterBuilder.ToSyncAdapter();
syncServerAdapter.TableName = "MyTableName";
//do similar thing for the client table adapter
You may want to read these articles:
How to: Use SQL Server Change Tracking
Getting Started: Client and Server Synchronization
- Marked As Answer by Liam Cavanagh - MSFTMicrosoft Employee, Owner Friday, March 06, 2009 6:10 PM
Monday, April 06, 2009 10:05 PM
Does anyone know how to Get and Set the Table Receive and Sent anchors using integrated change tracking. I am using the sample posted and am trying to change the code for integrated change tracking, but on the SetTableReceivedAnchor I am getting the following error: Object reference not set to an instance of an object.
the paramater @anchor value anchor.Anchor has a value of nothing. I suspect I am not retrieving the anchors correctly. Any ideas on how to do this?
Tuesday, May 12, 2009 4:48 PMDid anyone manage to solve the problem? I'm allso stuck with implementation of GetTableReceivedAnchor and GetTableSentAnchor to work with SQL 2008 change tracking...