Search code examples
c#.netsqlwindows-mobile

Synchronize window mobile application with central database?


My requirement is to create a windows mobile 6.1 app [for a window PDA] that works most time in offline, and when it has connection it should work online to synchronize the data from PDA to server and server to PDA to keep the local and central database up to date.

There will be lots of transactions inside PDA and online too.The app will run more than one PDAs. So there will be lots of transactions in every PDA and it should sync with the central server when it is online.

How can I achieve this? Can I use microsoft synch service to do it? or any better other methods to solve it?


Solution

  • Short answer is yes, you can use Microsoft Sync Framework to do it.

    However, quoting word to word from microsoft,

    The major disadvantages to this solution are:

    • Changes are required in the central database schema to add columns and tables that may affect current applications.
    • Triggers are fired for each change made to a row, which has performance implications.
    • Logic for maintaining proper rowversions and row deletions can get extremely complicated.
    • Long running transactions can result in some data being missed during synchronization, resulting in data inconsistencies.

    You are in very much luck if the master database is in SQL Server 2008 though. Read "Challenges of Building an OCA" section in the article because there's no point in pasting everything here :)