Hello!
I have a query regarding Merge Replication.
I have 5 Tables.
- SetYarnMain Fields (MainId(PK), MainName, Comments)
- SetYarnSub (SubId(PK), SubName, MainId(FK), Comments)
- SetYarnDet (DetId(PK), DetName,SubId(FK),MainId(FK), Comments)
- SetYarnGrp (GrpId(PK), GrpName, DetId(FK),SubId(FK),MainId(FK), Comments)
- SetYarn (YarnId(PK),YarnName,GrpId(FK),DetId(FK),SubId(FK),MainId(FK),Comments)
These Tables doesnt have Identity Column
Lets take 2 tables SetYarnMain and SetYarnSub. I am generating a series in SetYarnSub Table with respect to SetYarnMain Table.
Let say MainId is 01 at Location A and at Location B.
If a user at Location B Inserts a row the SubId let say becomes 01001, but If a user at Location A Inserts a row then same Id is generated because the replication hasn't done yet.
When merge replication is performed table SetYarnSub at both location has 01001 id creates conflict in PK.
I need to know how to solve this problem.
Please if someone has the solution I humbly request to post it immediately.
Thanks and Regards
Jugnu