Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a issue regarding Merge Replication. I have a table SETTINGS where in i store the settings of my software. The schema of the table is ID ( PK) , Description , Value. Suppose i have 15 rows in this table on my server. Now i have applied filter on this table saying only the first 10 rows would replicate.

Now with this settings when i sync for the first time, i receive the 10 rows on my client (having subscription). Then i add the remaining 5 on my client. Now when i sync again it gives me a conflict saying that
A row insert at 'ClientServer.ClientDatabaseName' could not be propagated to 'MyServer.ServerDatabaseName'. This failure can be caused by a constraint violation. Violation of PRIMARY KEY constraint 'PK_SETTINGS'. Cannot insert duplicate key in object 'dbo.SETTINGS'. The duplicate key value is (11).


What i don't understand is why is it trying to replicate something (row) which is outside the subset filter applied on that table ?? Please help guys.

Is this scenario not possible with Merge replication ?

https://msdn.microsoft.com/en-us/library/ms151775.aspx the link suggests that this is possible. But confused.
Posted

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