locked
Sync Framework Runtime v1.0 upgrade to SP1 causes a SQLCEException (DummyUpdateTables) in deployed application RRS feed

  • Question

  • We have deployed an application on .net framework v2.0.50727 using Sync Framework Runtime v1.0, Microsoft Sync Services for ADO V2.0 and SQLCE 3.5 SP2. We are starting to see errors when we install the application onto machines with Sync Framework Runtime v1.0 SP1 and Microsoft Sync Services for ADO V2.0 SP1. The exception outlined below is thrown. If I uninstall the SP1 then the errors dissapear. I have tried to use assembly redirection to point the application at the pre sp1 assemblies but it wont work because they have the same version number. Has anyone encountered any issues upgrading. The sqlce db is created befor the sync begins.  Uses DbServerSyncProvider and SqlCeClientSyncProvider. The syncdirection is a mixture of Bidirectional, DownloadOnly. The table creation options are UseExistingTableOrFail and UploadExistingOrCreateNewTable.

    14:48:37.010 Tid=[1] [SyncServerController] Reading Metadata - 1% complete
    14:48:37.339 Tid=[1] [SyncServerController] Creating Schema - 3% complete
    14:48:54.697 Tid=[1] [SyncServerController] Uploading Changes - 15% complete

    Exception:
       System.Data.SqlServerCe.SqlCeException

    Message:
       There was an error parsing the query. [ Token line number = 1,Token line offset = 67,Token in error = = ]

    Source:
       SQL Server Compact ADO.NET Data Provider

    Stack Trace:
       at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
       at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
       at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
       at Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.DummyUpdateTables(SyncSession syncSession)
       at Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
       at Microsoft.Synchronization.SyncAgent.UploadChanges(SyncGroupMetadata groupMetadata)
       at Microsoft.Synchronization.SyncAgent.DataSynchronize()
       at Microsoft.Synchronization.SyncAgent.Synchronize()
       at IPFX.UP.SyncServerDataLayer.SyncProvider.RunSync(Collection`2 syncTables)
       at IPFX.UP.SyncServerDataLayer.SyncProvider.Synchronise(Boolean disableRowChangedNotificaitons)
       at IPFX.UP.SyncServerDataLayer.SyncServerController.Synchronise(Boolean disableMessaging)
       at IPFX.UP.BusinessLayer.CatalogManager.SyncAllTables()

     

     

    Friday, October 22, 2010 5:05 AM

Answers

  • Thanks for your help Dong,

    I have discovered a work around. I basically loop through each table befor I run the sync. If the Change Tracking columns haven't been created I do the following:

    SqlCeClientSyncProvider.GetChanges("TableName");

    This creates the change tracking columns on the table. This stops the errors in the sync and everything appears to function correctly.

    • Marked as answer by Joelw777 Tuesday, October 26, 2010 10:41 PM
    Tuesday, October 26, 2010 10:41 PM

All replies

  • Hi,

    With SyncFx v1 SP1, you need to install SQLCE 3.5 SP2. The SqlCeClientSyncProvider in SyncFx v1 SP1 is coded on top of new SQLCE change tracking public APIs. Please find more details in the overview section of the SyncFx 1.0 SP1 download page: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b4f54dd0-5b66-4043-9b50-b12604bfcf35

    Here is the link to download SQLCE 3.5 SP2: http://www.microsoft.com/downloads/en/details.aspx?familyid=E497988A-C93A-404C-B161-3A0B323DCE24&displaylang=en

    Thanks,
    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Monday, October 25, 2010 10:09 PM
  • We install SQLCE3.5 SP2 as part of our installer and all project references point to SQLCE 3.5 SP2.

    Monday, October 25, 2010 10:31 PM
  • When I right click properties on the c:\windows\assembly I get the following version numbers:
    Microsoft.Synchronization:   File Version=1.0.3010.0
    Microsoft.Synchronization.Data:   File Version=2.0.3010.0
    Microsoft.Synchronization.Data.Server:   File Version=2.0.3010.0
    Microsoft.Synchronization.Data.SqlServerCe:  File Version=3.5.8080.0
    System.Data.SqlServerCe:   File Version=3.5.8080.0     

    This is a dump fo the loaded assemblies from my project just befor calling syncagent.Synchronise();

    Version=[2.0.0.0] [mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] Location=[c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll] GAC=[True]
    Version=[1.0.0.1] [IPFX.BaseLib, Version=1.0.0.1, Culture=neutral, PublicKeyToken=94a279206fcdb594] Location=[C:\WINDOWS\assembly\GAC_32\IPFX.BaseLib\1.0.0.1__94a279206fcdb594\IPFX.BaseLib.dll] GAC=[True]
    Version=[2.0.0.0] [System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] Location=[C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll] GAC=[True]
    Version=[2.0.0.0] [Microsoft.Synchronization.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91] Location=[C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Synchronization.Data\2.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.Data.dll] GAC=[True]
    Version=[2.0.0.0] [Microsoft.Synchronization.Data.Server, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91] Location=[C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Synchronization.Data.Server\2.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.Data.Server.dll] GAC=[True]
    Version=[1.0.0.0] [IPFX.Productivity.BusinessObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=676e96d8cc27ff85] Location=[C:\WINDOWS\assembly\GAC_32\IPFX.Productivity.BusinessObjects\1.0.0.0__676e96d8cc27ff85\IPFX.Productivity.BusinessObjects.dll] GAC=[True]
    Version=[1.0.0.0] [IPFX.Productivity.DataLayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=81759cdb9cc86947] Location=[C:\Program Files\IPFX\Achieve\IPFX.Productivity.DataLayer.dll] GAC=[False]
    Version=[2.0.0.0] [Microsoft.Synchronization.Data.SqlServerCe, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91] Location=[C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Synchronization.Data.SqlServerCe\2.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.Data.SqlServerCe.dll] GAC=[True]
    Version=[3.5.1.0] [System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91] Location=[C:\WINDOWS\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91\System.Data.SqlServerCe.dll] GAC=[True]
    Version=[1.0.0.6] [IPFX.Messaging, Version=1.0.0.6, Culture=neutral, PublicKeyToken=9e7b836df5de3b59] Location=[C:\WINDOWS\assembly\GAC_32\IPFX.Messaging\1.0.0.6__9e7b836df5de3b59\IPFX.Messaging.dll] GAC=[True]
    Version=[2.0.0.0] [System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] Location=[C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll] GAC=[True]
    Version=[1.0.0.0] [Microsoft.Synchronization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91] Location=[C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Synchronization\1.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.dll] GAC=[True]
    Version=[2.0.0.0] [System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] Location=[C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll] GAC=[True]
    Version=[2.0.0.0] [System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] Location=[C:\WINDOWS\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll] GAC=[True]

     

    Monday, October 25, 2010 11:17 PM
  • Hi,

    Sorry for the wrong guess, and your assemblies look correct to me.

    For the CE table that hit this exception, does it have a composite primary key? If not, please share the schema of your sync tables. We will try to repro.

    Thanks,
    Dong

     


    This posting is provided AS IS with no warranties, and confers no rights.
    Tuesday, October 26, 2010 10:24 PM
  • Thanks for your help Dong,

    I have discovered a work around. I basically loop through each table befor I run the sync. If the Change Tracking columns haven't been created I do the following:

    SqlCeClientSyncProvider.GetChanges("TableName");

    This creates the change tracking columns on the table. This stops the errors in the sync and everything appears to function correctly.

    • Marked as answer by Joelw777 Tuesday, October 26, 2010 10:41 PM
    Tuesday, October 26, 2010 10:41 PM
  • Hi,

    It is good to know that you find a workaround. By calling SqlCeClientSyncProvider.GetChanges(string tableName), you initialized your table with TableCreationOption.UseExistingTableOrFail. it seems work around a provider bug when using TableCreationOption.UploadExistingOrCreateNewTable for table initialization. If you are willing to change your app to not use TableCreationOption.UploadExistingOrCreateNewTable, you may not need to add this workaround in your code. 

    Thanks,
    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Tuesday, October 26, 2010 11:52 PM