locked
Sync based on changing filters RRS feed

  • Question

  • Hi All,

    I have a mobile device that bi-directionally syncronises to a SQL Server 2005 database and a number of the tables have SyncParamters as the table contains millions of rows.

    The issue I have is when you first sync to the server based on a filter of SyncParamters ID = 1 then the data comes down correctly for the four related tables, however when I have made changes / add data to the local SQLCE database and attempt to resync with SyncParamters ID = 2 then the upload works correctly but the data for ID = 2 does not download.

    When the SyncParameter is changed it must still upload and current changes from the local database before downloading the data for the new filter criteria.

    After some investigation I realised the problem was due to the SyncAnchor datetime stamp being greater than the created / updated time on the server so the sync framework did not find any changes.

    Is there a way around this without dropping the SQLCE table and re-downloading? Is it possible to reset the client SyncAnchor?

    Thanks

    Phil
    • Edited by Phil Murray Thursday, November 19, 2009 10:32 AM
    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:36 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, November 18, 2009 12:01 PM

Answers

  • Hi Phil,

    sorry for the delay.

    Changing the filter values between syncs are not currently support. There is a similar post a fews days ago and some details can be found at http://social.microsoft.com/Forums/en-US/syncgeneral/thread/dab3b7d1-3712-469d-97b2-cfea41892a52.

    the workaround you did, i.e. uplaod, then snapshot is basically the recommended way ( re-init ) to deal with this situation.

    the local changes on the client should be sync-ed to the Server. I would suggest you check : 1. if the rows are correctly selected at the client ? 2. if #1 is true, are those rows correctly applied to the sql Server ?

    Enable Tracing and using sql profiler, or hook up with the changesSelected, applyingChanges events on the client/server provider could help to get the issue nail down.

    thanks

    Yunwen


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 20, 2009 6:06 PM
    Moderator

All replies

  • Anyone ??
    Thursday, November 19, 2009 9:09 AM
  • Anyone from Microsoft care to comment on my problem or is this just another example of Microsoft not supporting the development community.

    You can not release something and then not support it, oh sorry we are talking Microsoft here.
    Friday, November 20, 2009 8:28 AM
  • I have changed from a bi-direction to an upload / snapshot method and while new rows are uploaded but changes to existing rows are not uploaded and then are overwritten on the snapshot download.

    If someone could take time to point me in the right direction I would apreciate it.
    Friday, November 20, 2009 3:36 PM
  • Hi Phil,

    sorry for the delay.

    Changing the filter values between syncs are not currently support. There is a similar post a fews days ago and some details can be found at http://social.microsoft.com/Forums/en-US/syncgeneral/thread/dab3b7d1-3712-469d-97b2-cfea41892a52.

    the workaround you did, i.e. uplaod, then snapshot is basically the recommended way ( re-init ) to deal with this situation.

    the local changes on the client should be sync-ed to the Server. I would suggest you check : 1. if the rows are correctly selected at the client ? 2. if #1 is true, are those rows correctly applied to the sql Server ?

    Enable Tracing and using sql profiler, or hook up with the changesSelected, applyingChanges events on the client/server provider could help to get the issue nail down.

    thanks

    Yunwen


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 20, 2009 6:06 PM
    Moderator
  • To add to previous post , depending on whether you intend to keep or throw away  the old synced data on client, the scenario may not be supported.
    thanks
    Jandeep
    jandeepc
    Saturday, November 21, 2009 12:10 AM