Click here to Skip to main content
15,907,225 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have windows application(pos-Point of sale) which can be installed on local machine where users can work offline and create POS.
now we have also created web application for admin which can view all the data that created by client applicatin.

i need to sync all the client database with one cental database ,and cental database also sync in every local application dataabse
when user online.


help me anyone please

What I have tried:

i tried Microsoft Synchronization.........but not successful.
Posted
Updated 26-Apr-16 23:06pm
v3
Comments
RickZeeland 27-Apr-16 3:21am    
It might be easier to let the Clients connect directly to the central database, otherwise you need database replication (which I have never used, but I read that it's problematic). If you have few changes you could also write INSERT / UPDATE sql scripts to update the Clients.
manvendra patel 27-Apr-16 5:05am    
I am synchronizing a number of databases with each other. I have one central SQL Server database and many client SQL Server databases. Now say I have table Xyz in the database which have a primary key ID.

In the first client we have the following IDs in table X:

xyz (client A)
--------
1|value1
2|value2
3|value3
4|value4

and in the second client I have

xyz (client B)
--------
1|value222
2|value333
3|value444
4|value555


Now when I synchronize the first client with the server, it will add the primary keys from (1 .. 4). However, when I synchronize with the second client, it will be PRIMARY KEY CLASH. How can I solve this problem?

1 solution

You have to define a sync algorithm, Whenever user makes any changes in local, store it with sync flag 0 and whenever user gets online connection ,sync all data with flag 0 and update those sync flag with 1.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900