Synchronising databases

Discussion in 'Questions (Windows Mobile)' started by BjornF, Oct 17, 2007.

  1. BjornF

    BjornF Active Member Licensed User

    Dear All,

    I want to write an application that compares and synchronises the records of two files of the same database (e.g. the file on the PDA with the one on the Pc). Does anyone know how programs that do record-synchronisation do it (e.g. Flexwallet, HanDBase)?

    To date my idea is to have a TimeStamp on each record which gives the tick when it was last changed, as well as a Unique identifier. An ini-file could give the time of the latest synchronisation.
    1) Records which have been changed earlier than last synchronisation and which exist in one file but not the other have obviously been deleted (and should so be deleted from where they are).
    2) Records changed or created later than the latest synchronisation should be copied over to the other file.

    If there is a smarter way of doing this I would very much like to hear about it! :sign0163:

    All the best / Björn
    Last edited: Oct 17, 2007
  2. Erel

    Erel Administrator Staff Member Licensed User

    I think that your solution is pretty good.
    Maybe you can store a boolean field that will mark all deleted row instead of really deleting them (you can delete them during synchronization).
    I recommend you to do the actual synchronization on the desktop and copy the database to the device eventually.
  3. BjornF

    BjornF Active Member Licensed User

    Thank you Erel, I'll have a go at it that way :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice