views:

201

answers:

1

Microsoft Sync Framework:

Sql CE and sql 2008 with change tracking option.

I am facing a problem, when i have a record inserted in sql CE and it needs to upload on sql 2008 with uploadonly direction. The server sync process gives clientInsertServerInsert conflict and it is impossible that server can add new row to this table.

Anybody have idea.

Another thing i noticed is that if I use the sql sever ce database created by VS.NET's design time sync UI(where you select the tables you want in your client db) the problem does not occurs. But when i distribute my application with blank sql sever ce database the error is throw for each inserted row on client.

When we made any change in client database (SqlCE), the changes are uploaded and fire ApplyChangeFailed event with conflict ClientInsertServerInsert if a new row is inserted. For example i have a table books (Name, Qty) and i have configure this table direction UploadOnly when i insert an record on client it goes to server successfully but conflict occurred "ClientInsertServerInsert" that mean server also insert same value that is impossible. And if on all changes conflict arises it slow down the process, and may cause problem. i use this line to continue.e.Action = ApplyAction.Continue;

A: 

Need some more info here. What is the actual error from the sql server? Is the record thats uploaded enough to populate the record on the server? e.g. does the server row need a rowid thats not automatically calculated or uploaded from the client? Are there constraints on data or indexes on the server that prevents duplicate data or null values in a record?

JohnnyJP
Did you manage to resolve your problem?
JohnnyJP