如何在Microsoft Sync Services for ADO.NET应用程序中强制执行STOP同步? [英] How to force STOP synchronization in a Microsoft Sync Services for ADO.NET application?

查看:92
本文介绍了如何在Microsoft Sync Services for ADO.NET应用程序中强制执行STOP同步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现了一个VB.Net应用程序,用于将SQL Server 2008数据库与SQL Compact 3.5数据库同步。我很敏锐地使用Microsoft Sync Framework和Microsoft Sync Services for ADO.NET。我还实施了自己的SyncProviders。我需要
强制停止同步,以便在同步过程意外完成后检查我的同步组是否一致。 SyncAgent类有一个Synchronize方法,但我没有找到任何Stop()方法(例如在同步的另一个
线程中)。


我会感谢任何建议。


谢谢,


Alina


 

解决方案

您可以取消同步 通过在其中一个事件中引发异常。


查看此主题:


http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/754cc1c6-26a7-4921-877b -53291cc66f74

http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/d128723b-da0e-44a6-bb16-409a47a7d25a


I implemented a VB.Net application for synchronize an SQL Server 2008 database with a SQL Compact 3.5 database. I´m using Microsoft Sync Framework and Microsoft Sync Services for ADO.NET. I also implemented my own SyncProviders. I need to force stop synchronization, to check if my sync groups are consistent after the synchronization process was unexpectedly finished. The SyncAgent class has a Synchronize method, but I didn´t found any method to Stop() it (for example in an different thread of the sync).

I will appreciate any suggestions.

Thanks,

Alina

 

解决方案

you can cancel the sync  by raising an exception in one of the events.

check out this threads:

http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/754cc1c6-26a7-4921-877b-53291cc66f74
http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/d128723b-da0e-44a6-bb16-409a47a7d25a


这篇关于如何在Microsoft Sync Services for ADO.NET应用程序中强制执行STOP同步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆