Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Synchronising databases


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2007, 12:23 PM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 143
Default Synchronising databases

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!

All the best / Björn

Last edited by BjornF : 10-17-2007 at 12:25 PM.
Reply With Quote
  #2 (permalink)  
Old 10-17-2007, 01:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

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.
Reply With Quote
  #3 (permalink)  
Old 10-18-2007, 08:26 AM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 143
Default

Thank you Erel, I'll have a go at it that way
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Support for Access databases Peter Basic4ppc Wishlist 3 03-18-2008 12:39 PM


All times are GMT. The time now is 06:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0