I have two sql server 2005 database - ParentDB and ChildDB, and i want to synchronize them using sync framework 2.1ParentDB is on server and ChildDB is on client m/c. There are many tables in ParentDB but few tables on ChildDB, Lets say, a Customer table is common between both db with Id (column) as primary key set to auto increment, and i want to synchronize this table, i am using the approach given in the following msdn example. This appraoch worked unless i do only download from server or upload to server.
Lets take a scenario :
1. There is a row with Id=52 on server table
2. Both db's are synchronized
3. Now a row is inserted on ParentDBin Customer table with Id=53
4. At same-time another row is inserted on ChildDB in Customer table with Id=53 (since both tables has auto increment)
Now when i synchronize both tables either of the two row gets overridden, depending on the direction of synchronization.
What i want is that Id is adjusted, and both rows are retained,
What should i do to resolve such conflict, if possible please provide pseudo code.
P.S. : I expect when we consider foreign key constraint then scenario will get more complicated.
Thnx in advance