locked
SyncFx 2.1, Downloading too many records even when filtering (Client with multiple Compact databases) RRS feed

  • Question

  • I have a SQL Server master database with several client PCs connecting to it. Each client PC has many SQL Server Compact databases. Each SQL Server Compact database contains the information for an individual customer to allow portability. This information is synchronised with the master database which contains information for all customers.

    I have a filter in place so that a Compact database can only synchronise the information for 1 customer.

    The problem I’m having is that when I switch between Compact databases on the client PC and synchronise the data I get the information for another customer downloaded to the Compact Database. What’s more strange is that only information from a previously provisioned Compact database is downloaded.

    For example, I have master database with customers A, B & C and a client with 3 x customer compact databases A, B & C. Initially, none of the compact databases or master database have any provisioning. If I then synchronise the Compact database for customer A the sync works perfectly. I can even copy this Compact database from PC 1 to PC 2, make changes to it on PC 2, sync it to the master and then sync it back to PC 1 correctly. However, when I sync the client Compact database for customer B, I get records for customer A too. I thought this might be a problem with my filtering but it’s strange that the records for customer C are not synchronised to B.

    Also, when I look at the master database, the records for each database have the correct values in the columns I am filtering by.

    I have tried using different synchronisation scopes for each PC and each customer but I still get this problem.

    Any ideas what could be going wrong?

    Thursday, January 6, 2011 1:10 PM

All replies

  • I've noticed that if I remove the provisioning from the master database before I synchronise the second customer database (B from the above example), the sync works. Unfortunately, this isn't a fix as I will need to reprovision the master database for every Compact database and lose the tracking information.

    Thursday, January 6, 2011 4:54 PM
  • I needed to use Parameter-based Filters. This is explained really well in JuneT's blog: http://jtabadero.wordpress.com/2010/09/02/sync-framework-provisioning/.

    Thanks JuneT, you're a job saver! :)

    • Proposed as answer by JuneT Tuesday, January 18, 2011 11:17 AM
    Saturday, January 8, 2011 1:28 PM