user581157
user581157

Reputation: 1409

Update and insert while synchronization Microsoft synchronization?

Microsoft synchronization implemented is as follows:

  1. I have Sql server DB with a table “Products” this table currently contains only one record as shown. enter image description here
  2. I then synchronize this with my client which is a Sql Compact edition (CE) so after I synchronize with the client the table in the client will also contain the same as above I use the LocalProvider-Sql compact edition and RemoteProvider-Sql Server DB. enter image description here

  3. Now , I change the SERVER “Products” table column entry “Name” – “PC” to “UBUNTUPC” so my server DB table looks like this and then there was an update on the products table . enter image description here

  4. Now, the table “Products” at the client sdf file is also changed this Products table contains two new records added to it the Client SDF Prodcuts table is as shown below. enter image description here
  5. Now If I synchronize both the DB’s with the LocalProvider as the SDF file(CE) and the RemoteProvider as the Sql Server with the sync direction as UploadAndDownload then Table in the client gets updated with these values shown below and the other two records are lost . enter image description here

How do I update from "PC" to "UBANTUPC" value in my client sdf at the same time I want to add “Laptop”, “Frantest” at the server products table ?

UPDATE: I have written the code where in I set the LocalProvider and the RemoteProvider manually. Below is the provider code

syncOrchestrator.LocalProvider = new SqlCeSyncProvider("OfflineDataScope", clientConn); 
syncOrchestrator.RemoteProvider = new SqlSyncProvider("OfflineDataScope", serverConn);

Upvotes: 0

Views: 83

Answers (0)

Related Questions