views:

845

answers:

1

I'm using Sync Framework v1 (which includes Sync Services for ADO.NET v2) and Sync Services for mobile v1.

I can sync a SQL Compact Edition database from a mobile device to SQL Express on a desktop PC.

I can also sync a SQL CE database from a desktop PC to a SQL Server database on a web server using WCF.

I want to sync from the mobile device to the desktop when it docks, and then have the desktop PC sync with the web server (the copy on the desktop machine is in case the web connection is unreliable).

Ideally, I'd like to avoid SQL Express anyway because I want the mobile & desktop setups to be as simple as possible.

Unfortunately, it looks like there's no way to fit these pieces together to make the connections I need because:

  1. The mobile device syncs to SQL Express on the PC, and I can't sync from SQL Express to SQL server.
  2. Syncing to SQL server has to come from SQL CE, and I can't sync the mobile device to SQL CE on the desktop

Is this just not possible, or possible with a large amount of code (custom SyncProviders and hand-crafted update statements etc), or have I missed something obvious?

Thanks for your time! Mark.

+1  A: 

I am using the same basic setup for a live application and it is working pretty well. I have the mobile device sync with the server using web services (WCF would also be fine) and I have the desktop app syncing somewhat like this and everything works really smooth.

Generally it would be a bad idea to have a client sync with a server who then syncs with a server because then you have to manage more state and the common tools and guides will not help you much.

I would also recommend against using sql merge replication unless you consider yourself an expert at managing SQL, because if you are not one now you will be one by the time you feel safe using it.

As a note, if you are willing to spend the time and effort in making your own Sync Framework providers, then you will find there is little you cannot do.

JasonRShaver
Unfortunately there's a chance that the desktop machine's connection to the server may be down, so I can't rely on the data taking the long way round (via the server) to get from the handheld to the desktop.
marklam
JasonRShaver