microsoft sync frame work for windows mobile RRS feed

  • Question

  • hello

    we are currently looking into sync framework and we are trying to perform synchronization by using windows 7 to windows mobile 6.1&6.5 mobile handheld devices. we are encountering some issues probably because of our lack of experience and would like to ask kindly for some assistance.

    we are using Microsoft synchronization services.

    1)First of all which version of the sync framework works on win mobile devices. I checked the http://msdn.microsoft.com/en-us/sync/bb840038 . Is this the latest version (Microsoft Synchronization Services for ADO.NET v1.0 Service Pack 1 (devices)) because it was published in 9/15/2008 and I can’t find a newer version.

    2)Can you please briefly explain the synchronization process? I think that we need to create a web service that handles the synchronization on the server. The mobile device will call this web service. The data that are downloaded are applied automatically on the client’s database or must we write custom code ( e.g. inserts, updates, deletes etc?)

    3)Can you please be so kind as to send us a working example of synchronization for windows mobile 6+ devices or a step by step turorial?

    4)How can we do data subsetting. I mean row filtering like for instance sending only the customers that are applicable to a specific salesman. I found http://msdn.microsoft.com/en-us/library/bb726003.aspx#Y684 which
    describes a way with writing custom code, is this the correct or is there any wizard  etc?

    5)Is there any tool that we can use in order to monitor the synchronizations, get error logs, view synchronization history, monitoring etc?

    6)Finally, how do the sync services handle schema evolution changes, for instance if we add/delete a table or a column of a table do they changes appear on the handheld’s database on the next sync? must we write any code in order to perform the changes or are they done automatically?

    7)Are the foreign keys transferred on the handheld when the database is created?

    Thank you very much for your help in advance.


    Wednesday, June 8, 2011 6:28 AM


All replies

  • 1. yes, that should be it. there has been no subsequent releases for devices.

    2 and 3 - check out the walkthrough here: http://msdn.microsoft.com/en-us/library/dd938879.aspx and this as well http://msdn.microsoft.com/en-us/library/cc761754.aspx

    4. the Local Database Cache wizard doesnt support filtering, so you will have to write custom code to attach your filter condition to the adapters and pass the corresponding filter values

    5. check out this link on how to enable tracing: http://msdn.microsoft.com/en-us/library/cc807160.aspx. other than that, you have to write custom code.

    6 and 7 Sync framework doesnt do schema synchronization. you will have to write custom code outside of sync framework to keep your schemas in sync. afaik, only PKs are created and not FKs. check out this link of other dev considerations: http://msdn.microsoft.com/en-us/library/bb726004.aspx





    • Marked as answer by dttech_dt Friday, June 10, 2011 11:44 AM
    Wednesday, June 8, 2011 10:03 AM
  • thank you for the answer, it seems that we must write a lot of our own code in order to make it work.
    i am working on one example the one at MobileSyncServices - WCF Compression but i encounter the same
    on the http://www.microsoft.com/downloads/en/details.aspx?familyid=42E26CFB-C70C-498F-B916-A7F6EB1E43CC&displaylang=en SyncServicesSamplesSP1.exe

    in the client windows mobile app whenever the code reaches the InitializeSyncProviders() the handheld
    appears to freeze and nothing happens for a very long time of watching the frozen handheld with the waiting cursor(more than 10mins) until in the end i get the following error. of course i have the file mentioned in the handheld (but in a newerer version 3.5.5386). the strange thing is that when the code reaches the breakpoint in that line it doesnt move inside the function with step into while debugging, it just freezes. i have tried commenting  [System.Diagnostics.DebuggerNonUserCodeAttribute()] but nothing changed.

    anyone encoutered this?im working on win mobile 6.5 motorola handheld device.this happens in the first sync  and i cant get the database schema created and the data downloaded on the handheld.

    File or assembly name 'System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found.
       at MobileSyncServices.NorthwindDataCacheSyncAgent..ctor()
       at MobileSyncServices.Form1.Sync()
       at MobileSyncServices.Form1.syncMenuItem_Click(Object sender, EventArgs e)
       at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32 wParam, Int32 lParam)
       at System.Windows.Forms.Form.WnProc(WM wm, Int32 wParam, Int32 lParam)
       at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
       at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
       at System.Windows.Forms.Application.Run(Form fm)
       at MobileSyncServices.Program.Main()


    Thursday, June 9, 2011 8:05 AM
  • since you downloaded a sample application with an older set of referenced assemblies, you might want to refresh the References.

    Friday, June 10, 2011 2:35 AM
  • yes your are correct we needed the sql ce sp1 for devices installed so that we have the correct references. thks
    Friday, June 10, 2011 11:43 AM