I’m using sync framework to synchronize sql server 2008 database with sqlCE on mobile device. Everything looks fine besides some problems. One of them is:
If i want to sync 1000 or more rows, i get OutOfMemory Exception on mobile device(tho the sync completes well, because after it i check the data of some rows and it looks synced). I thought that maybe too large xmls are rotating between mobile device and server(for 100 rows evrth works just fine)…Thats why i asked about how to split the sent data. But maybe im wrong. I didn’t found any resources on this, so i dont exactly know WHAT can eat so much memory to add just 60Kb to the compact database.
I’m using sync framework to synchronize sql server 2008 database with sqlCE on mobile
Share
You’ll need to implement some sort of batching.
A quite naive version of it is shown on here:
http://msdn.microsoft.com/en-us/library/bb902828.aspx.
I’ve seen that you’re intrested in some filtring. If this will filter out some, or rather alot, of rows I would recommend to write your own batch logic. The one we’re currently using sets the @sync_new_received_anchor to the anchor of the @sync_batch_size:th row to be synced.
In a quite simplified way the logic looks like this: