Asked by:
Upload sync doesn't work

Question
-
Hi,
I have the following scenario:
- on both server / client a I have an upload scope installed;
- on server side I'm writing in table A; after that, I used sqlBulkCopy to perform a full copy of the new row into client table A (the business flow does not allow me to use a bidirectional sync sope).
- from that moment, all changes are performed on client data base
The problem I'm trying to get an answer is why after scope run, the client changes are not reflected on the server. No ApplyChangeFailed conflict was occured. My goal is to overwrite all server data based on what changes was applied on client. Please help me with an advice.
Monday, October 21, 2013 2:08 PM
All replies
-
change tracking is hugely based on triggers, if you're using bulk operations such as bcp, bulk copy, etc..., that doesn't fire triggers, then changes won't be tracked.Tuesday, October 22, 2013 2:11 AM
-
I forgot to mention that I used SqlBulkCopyOptions.FireTriggers option and everything is fine in @tableName_tracking table. There is any @tableName_tracking column data that I can change to force needed behaviour?Tuesday, October 22, 2013 3:11 AM
-
enable sync fx tracing and post the trace...
if the tracking tables are being updated, then changes should have been selected...
if you insert in server and insert the same rows on client, you should be getting insert conflicts.
Tuesday, October 22, 2013 3:54 AM -
I think I found the reason of my problem but I still need your help. The comercial enviroment of our solution it use an NTier configuration. I did'nt find any way to resolve conflicts on server side, while remote provider type is KnowledgeSyncProvider and no ApplyChangeFailed event provided by this class.Tuesday, October 22, 2013 7:44 AM
-
are you trying to listen for the ApplyChangeFailed event on the client side? if you're using WCF, the event fires on the server side. i doubt they will fire it back to you on the client side...Tuesday, October 22, 2013 8:12 AM
-
Yes I'm handling ApplyChangeFailed on client but only for client provider which is SqlSyncProvider; the remote provider (WCF) is KnowledgeSyncProvider as base type and I can't handle this event. Does Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins line insert on WCF service will resolve my problem? Or, there is any chance to handle remote ApplyChangeFailed conflict on client side?
Tuesday, October 22, 2013 8:18 AM -
Hi June,
My problem is fixed, by ApplyChangeFailed event handling on server side (he was there :)). Thank you for your patience.
Tuesday, October 22, 2013 8:42 AM