Synchronization -> Demo I
Hi!!
I followed the article of Rafik to make my first synchronization between SQL 2005 and SQLce. Everything works fine, BUT
I've a little problem with primary and foreign keys...
I've 3 tables :
createtablePerson(
iduniqueidentifiernotnull,
firstNamenvarchar(25)null,
lastNamenvarchar(25)null,constraint PK_PERSONprimarykeynonclustered(id))
create
tableGroups(iduniqueidentifiernotnull,
namenvarchar(25)null,
ownerIDuniqueidentifiernull,-- refers to a Person of table 'Person'
descriptionntextnull,constraintPK_GROUPSprimarykeynonclustered(id))
create
tableTakePart(iduniqueidentifiernotnull,
personIDuniqueidentifiernull,-- refers to a Person of table 'Person'
groupIDuniqueidentifiernull,-- refers to a Group of table 'Groups'constraintPK_TAKEPARTprimarykeynonclustered(id))
Situation :
One person take part to one group (= 1 record per table)
Problem :
When I want to delete the group with SQL Server Management, it returns an error. And this is completely normal, because this group is still in use in table 'TakePart'!! (error :The DELETE statement conflicted with the REFERENCE constraint "FK_TAKEPART_REFERENCE_GROUPS".)
BUT
When I delete this group from the client, it's no problem! The delete operation is made on the client database and when I synchronize it is not deleted on the server database.
So the client database and server database are no more synchronized! I think this is not very good![]()
![]()
If somebody can help, thx![]()
PS: and sorry for my poor english....

