locked
Sync Desktop SQLCE 3.5 SP2 to Mobile SQLCE 3.5 SP2 RRS feed

  • Question

  • I have the following senario -

    An application with a desktop version and a WM 6.5 Pro version.  Both use identical SQL CE Compact 3.5 SP2 databases.

    I need to synchronize the changes made at the column level in the desktop database with changes made at the column level on the mobile database, having both databases identical after synchronization.  I could live with row level changes if necessary.  I need to accomplish this between the CE databases directly without using an SQL Server or SQL Server Express intermediary database.

    Connection will typically be over USB when the mobile device is docked to the desktop.  ActiveSync is currently used for Outlook synchronization.

    VS2008 and SyncFramework 2.1 available.

    All of the research I have done has left me puzzled as to whether this can be done or not.  Some threads or posts say yes other say not out of the box.

    If this can be accomplished I would appreciate an example of any custom providers necessary to perform the synchronization.

    Thank You

     

     


    Mike Nichols
    Wednesday, December 22, 2010 3:21 PM

Answers

  • there may be some confusion in previous posts, from Rafik at that time: "The sync framework runtime gives you the ability to build providers just like the one we built for databases and files. So you can basically use the runtime to write a new provider for SQLCE such that you can sync between two (or more) SQLCE database. It is a lot more work than using the out-of-box components like DbServerSyncProvider\DbPeerSyncProvider but doable."

    Sync framework doens't have a out-of-box support for this CE to mobile CE scenario support. The scenario we support for mobile CE sync is through WCF to Sync with a SQL Server.

    The architecture mentioned above is for collaboration providers, they support Desktop CE to CE sync or CE to SQL sync with SqlCeSyncProvider, DbSyncProvider or SqlSyncProvider, but it doesn't support mobile device, including Ce to mobile CE sync.
    If you can consider copying the mobile database to/from CE device, then you can have more options, such as using directly connected (2-tier) v2.1 SqlCeSyncProviders to 2 CE dbs or in n-tier way, CE db to another CE on other machine with WCF service.

    Monday, December 27, 2010 6:34 PM
    Answerer

All replies

  • Do you have references of the posts that describe how to do it?

    This is not a tested/supported scenario from Sync framework team. However, you could consider sync Ce device client to a SQL Server then sync the SQL Server with a desktop Ce client.

    Thursday, December 23, 2010 12:50 AM
    Answerer
  • As far back as 2007 there was discussion that this type of senario would be provided for in the Sync Framework -

    (Last Post)
    http://social.microsoft.com/Forums/en-US/synctechnicaldiscussion/thread/4c7633f0-2cbe-468c-8bba-4fe987f05b38

    http://social.microsoft.com/Forums/en-US/uklaunch2007ado.net/thread/4d3beb9e-1cbd-4029-b055-54429a36bb6c

    http://social.microsoft.com/Forums/en-US/uklaunch2007ado.net/thread/2296ff6f-066f-45fa-b0bb-796bf2dde5ae

    (Second Post)
    http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/c35b420b-4aff-4b61-aded-f9d28f583f84

    I just have to believe that syncing a desktop and mobile SQL CE without going through an intermidiate SQL database can be done even if not with the Sync Framework.

    Could I use the following architecture (paragraph 2) to accomplish this?
    http://msdn.microsoft.com/en-us/library/bb902829.aspx

    From the desktop could I connect to and open the local db and connect to and open the mobile db at the same time then write my own record processing code?  If so how do I make the connection to the mobile when docked?

    Could I copy the mobile database to the desktop, sync the two then copy back to the mobile?

    Considering the level of confidence that this senario would be provided for back in 2007 - 2008 including examples, will this be available in Sync Framework 4.0?

    Thank You


    Mike Nichols
    Thursday, December 23, 2010 3:24 AM
  • there may be some confusion in previous posts, from Rafik at that time: "The sync framework runtime gives you the ability to build providers just like the one we built for databases and files. So you can basically use the runtime to write a new provider for SQLCE such that you can sync between two (or more) SQLCE database. It is a lot more work than using the out-of-box components like DbServerSyncProvider\DbPeerSyncProvider but doable."

    Sync framework doens't have a out-of-box support for this CE to mobile CE scenario support. The scenario we support for mobile CE sync is through WCF to Sync with a SQL Server.

    The architecture mentioned above is for collaboration providers, they support Desktop CE to CE sync or CE to SQL sync with SqlCeSyncProvider, DbSyncProvider or SqlSyncProvider, but it doesn't support mobile device, including Ce to mobile CE sync.
    If you can consider copying the mobile database to/from CE device, then you can have more options, such as using directly connected (2-tier) v2.1 SqlCeSyncProviders to 2 CE dbs or in n-tier way, CE db to another CE on other machine with WCF service.

    Monday, December 27, 2010 6:34 PM
    Answerer