Can someone point me in the right direction for handling a PK conflict error in c# .net using Sync Framework.
I am trying to sync between sql server 2008 and local data cache database (.sdf) and would like to keep BOTH rows that are conflicting in both server and client and NOT allow either the server or client win?
I get a pk conflict error when I insert a new row into both the server and client that have the same PK id.
Any suggestions would be grateful.
Thanks
This is solved by using a GUID for the PK instead of a auto-incrementing int.
This guarantees that each row inserted by the server or any client will be unique and works very well.
There are some disadvantages such as additional storage space and time it takes to search etc but this is something I am willing to live with (and I will filter the data that the client gets which will help to improve performance).
Thanks everyone for your help.