开发者

Microsoft Sync Framework between sql CE and sql 2008 with change tracking

开发者 https://www.devze.com 2022-12-25 01:11 出处:网络
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

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 w开发者_JAVA技巧hen 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;


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号