Answered by:
The specified change tracking operation is not supported

Question
-
I am using SqlCeChangeTracking class to to track SQLCE changes
SqlCeConnection connection = new SqlCeConnection(Utility.ConnectionString);
connection.Open();
SqlCeChangeTracking changetracking = new SqlCeChangeTracking(connection);
changetracking.EnableTracking("SYNC_SampleTable", TrackingKeyType.PrimaryKey, TrackingOptions.Insert);
changetracking.EnableTracking("SYNC_SampleTable2", TrackingKeyType.PrimaryKey, TrackingOptions.All);
connection.Close();when i do the Synchronization ,I'm getting this error.
can anyone help me?
The specified change tracking operation is not supported. To carry out this operation on the table, disable the change tracking on the table, and enable the change tracking.
at System.Data.SqlServerCe.SqlCeChangeTracking.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeChangeTracking.VersionCheck(TrackingVersion& iCurrentVersion, TrackingVersion tSupportedVersion, TrackingVersion tUnsupportedVersion)
at System.Data.SqlServerCe.SqlCeChangeTracking.GetTrackingType(String tableName)
at Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.GetTableRowKey(SqlCeCommand cmdUtil, String tableName, Boolean& fRowGuidFound)
at Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.CreateOcsTable(String fmtTableName, Boolean createTable, SyncTable syncTable, SyncSchema syncSchema, SqlCeCommand cmdUtil)
at Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.CreateSchema(SyncTable syncTable, SyncSchema syncSchema)
at Microsoft.Synchronization.SyncAgent.InitClientSchema()
at Microsoft.Synchronization.SyncAgent.Synchronize()
at PreCom.Sync.Client.SyncClientAgent.Sync()
at PreCom.Sync.Client.PreComSyncClient.Synchronize()
at PreCom.Sync.GuiModule.frmGuiModule.btnSync_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Windows.Forms.Control.TASK.Invoke()
at System.Windows.Forms.Control._InvokeAll()
at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows.Forms.Application.Run(Form fm)
at PreCom.Application.Initialize()
at PreCom.ApplicationMobile.a()Wednesday, May 4, 2011 11:16 AM
Answers
-
You should be using the Sync Services for ADO.net for desktops v1 and Sync Services for ADO.net for devices v1 SP1 for your scenario:
The devices page contains a readme and sample. Please take a look.
And I dont understand why you need to enable change tracking explicitly on the ce side?
This posting is provided AS IS with no warranties, and confers no rights- Proposed as answer by Dong CaoMicrosoft employee Thursday, May 5, 2011 11:41 PM
- Marked as answer by Dong CaoMicrosoft employee Sunday, May 8, 2011 12:42 AM
Thursday, May 5, 2011 7:26 AM
All replies
-
have you checked the version of Sql Compact vs Sync Fx? see: http://social.technet.microsoft.com/wiki/contents/articles/clarifying-sync-framework-and-sql-server-compact-compatibility.aspxWednesday, May 4, 2011 11:38 PM
-
Yes ,I'm using
Sync Services for ADO.NET for Devices 1.0 SP1 , Sync Framework 2.1 ,Visual Studio 2008 SP1 , SQL Server Compact 3.5 SP2.
Thursday, May 5, 2011 5:19 AM -
You should be using the Sync Services for ADO.net for desktops v1 and Sync Services for ADO.net for devices v1 SP1 for your scenario:
The devices page contains a readme and sample. Please take a look.
And I dont understand why you need to enable change tracking explicitly on the ce side?
This posting is provided AS IS with no warranties, and confers no rights- Proposed as answer by Dong CaoMicrosoft employee Thursday, May 5, 2011 11:41 PM
- Marked as answer by Dong CaoMicrosoft employee Sunday, May 8, 2011 12:42 AM
Thursday, May 5, 2011 7:26 AM -
I have this problem
http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/07cd97f1-f68f-43e5-a70a-b08bd3e371b4
that is why i tried to enable change tracking explicitly.
It works fine but it need to reinitialize the database connection in the device after the first Sync.
Thursday, May 5, 2011 8:37 AM -
As I mentioned above, please use the right set of bits on the server and client and see if you still have the problem.
This posting is provided AS IS with no warranties, and confers no rightsFriday, May 6, 2011 5:50 AM