开发者

SqlCeReplication: using ReinitializeSubscription before each Synchronize?

I'm working on a bug in a legacy Windows Mobile 5 app, which uses SQL CE Replication to sync a SQL CE database with a SQL Server 2005 or 2008 database (using Merge replication).

There is some behavior in the application which I don't believe is related to the bug, but I was curious what the side-effects of it might be. The code ends up calling "Reini开发者_StackOverflow社区tializeSubscription(true)" on the SqlCeReplication object before it calls Synchronize. The "true" flag just tells the reinit to upload any changes before reinitializing, which is fine. I don't believe there is a concrete reason to reinit the sub each time, but that's what it does...

What is the impact of calling ReinitializeSubscription on the SqlCeReplication object before each Synchronize call? Is it just a performance hit, or is it actually doing something different with the data synchronization, compared to not calling ReinitializeSubscription before Synchronize?


Unless you are experiencing major client íssues, do not reinit each time you sync, that will download the entire client database (after uploading changes), and consume time and bandwidth, and give a poor user experience (unless you data set is very small and you have high bandwidth, of course)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜