How to manipulate initial (first) synchronization RRS feed

  • Question

  • Hello,

    I have a smart device application with a local database cache that synchronizes with a central SQL server database through sync services for ADO.NET. When synchronizing, I can manipulate the data that is synchronized by using SyncParameters and changing the various insert and update commands that are available to me. For example: I have a Workticket and a Mechanic table. The Workticket table contains the worktickets for each mechanic and the tables are connected through a foreign key. So on first synchronization, I want to get the Worktickets for a specific Mechanic but I don't want the whole table with Worktickets synchronized, so normally I would do something like this: SELECT * FROM Workticket WHERE mechanicid = @mechanicid, and set a SyncParameter for @mechanicid. But on first synchronization, I can't find a command that can do exactly this. It seems that the whole table is automatically synchronized and it cannot be changed.

    Does anyone know how to manipulate the first sync so that irrelevant data is not synchronized?
    • Moved by Tina_Tian Friday, April 22, 2011 7:46 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, November 24, 2008 9:24 AM

All replies

  • Anybody who has the answer?
    Tuesday, November 25, 2008 1:22 PM

    You can pass the custom parameters in the SyncSession.SyncParameters collection. Any parameter present in this list will be applied on any of the command being executed.
    Wednesday, December 3, 2008 12:43 AM