I worked a bit about this since my first post.

I followed the lead I talked about in the previous post. Here is the main
mechanism.

Note that EVERY insert in the database is first made locally.

- First I detect whether I am online or not.

- If I am I do the sync every X seconds/minutes:
           - local to server : I encode any inserted rows in my local tables
in XML and send it to the server which decodes it and makes the rights
inserts in its own database.
           - server to local : the client asks the server to send its
tables. the Server encodes them in XML and send them back. The client
empties its tables and fill them with the decoded XML tables from the
server.
           - I then update any view which needd to be on my client.
- If I am not, I only do inserts locally and wait for the connection to
become active again.

This is far from being optimized but at least you have an up-to-date
database both locally and online

This only answers your question partially but like I said I am still working
on it.

I might post some more details eventually.
On Fri, Mar 6, 2009 at 10:41 AM, Harikrishna Trivedi <
[email protected]> wrote:

>
> Did you understand my problem ?
> I want to update local as well as online database with new data from
> both the side..
> Consider here is the numbers of client deal with online and offline
> database.
>

Reply via email to