Hi, I'm just wondering how to stop the DeleteCommand from deleting server rows! I have a few client SyncTables that are bi-directional and upload only and I want to ensure that server data is protected (when the row filter is changed on the client, I do not want the server to delete the rows that are now out of scope). My delete command is currently the default (auto-generated code):
DELETE FROM SyncTableName WHERE PK_Field = [@PK_Field] AND (@sync_force_write = 1 OR ([TimeStampUpdated] <= @sync_last_received_anchor)) SET @sync_row_count = @@rowcount;
Is it possible to change it do nothing (i.e. not delete any server rows) and how can I do this? At the moment, I have a problem with server data being deleted when the filter changes on the client.
Any help appreciated
Jon
Moved byMax Wang_ChinasoftWednesday, April 20, 2011 11:30 PMForum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
I thought records were being deleted, in fact the records were not being processed by the server once they were uploaded and were never processed to start with. I restarted the IIS application pool where the sync component is hosted and records started being processed again. However, from the client point of view records were sync'd successfully even though the records never reached the datbase table so old records are still on the device because the sync sent/received anchor on the client was set after the 'successful' sync. No errors, or anything to indicate any problems. Simply, the UploadOnly sync table was never processed on the server even though other sync tables in the same sync group were. Really strange problem.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.