locked
Do these requirements exclude Sync Services? RRS feed

  • Question

  • I have been prototyping an occasionally-connected app with Sync Services for ADO.NET, but I think the project's requirements may be pushing me in a different direction:
    1. Client must be Windows Mobile.
    2. There is a large quantity of preexisting data.
    3. The data sent to the client needs to be filtered per user.
    Requirements #1 & #2 mean we must use batching.  I tried syncing without batching and my device ran out of program memory on the first table. Requirement #3 means we can't deploy the data with the app, instead it needs to be created on initial sync.  The problem with this is that the SQL scripts generated by VS2008's Add Local DB Cache wizard assign the same CreationDate to every preexisting row in a table.  This means the entire table will be downloaded in a single batch on initial sync even if batching is turned on... at least when using any example SelectNewAnchorCommand that I have been able to find.  I have a working knowledge of SQL, but I am not an expert.  Is there a SelectNewAnchorCommand I can use which will split up my initial sync data?  Is there some other pattern which will get the user-specific data to my device without making it throw up.
    • Moved by Hengzhe Li Friday, April 22, 2011 7:55 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, May 22, 2008 1:19 PM

All replies

  • Indy,

     

    Are you using the device bits located here:

     

    http://www.microsoft.com/downloads/details.aspx?FamilyId=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en

     

    In addition, have you looked at our batching demo located here:

     

    http://www.syncguru.com/projects/SyncServicesDemoBatching.aspx

     

    Sean Kelley

    Data Replication and Synchronization

    Microsoft

     

     

     

    Friday, May 23, 2008 1:44 PM
    Moderator
  • Yes, and yes.  The device sample project and Robeal's batching demo were invaluable in getting me this far.  If I create the database off-device and copy it over then the batching works great for subsequent changes.  My problem is that the initial sync downloads the incremental inserts in one batch per table because all rows share the same CreationDate.  This is not a problem for small tables, but when I get to a table with 30k rows I get an out of memory exception on the device.  I need a SelectNewAnchorCommand that is smart enough to split up those initial inserts.
    • Proposed as answer by Tina_Tian Friday, April 22, 2011 7:55 AM
    Friday, May 23, 2008 6:26 PM
  • I am having the same problem.

    The initial sync of one of the tables is downloading all 50k rows at once.

    This is ok on my development machine, but will result in an out of memory exceptions on the client machines.

    I too have looked at batching demo and the help on msdn, but this does not cure the problem.

    Have you made any progress?

    It surely must be possible to batch the inital sync, as this is when the most data will be downloaded.

    Please help, microsoft?

     

     

     

    Wednesday, November 5, 2008 12:22 PM