在从SQL CE同步数据并在SQL CE中删除它们并再次与SQL 2008同步后,如何将数据保留在SQL 2008中? [英] How can I keep the data in SQL 2008 after I sync them from SQL CE and delete them in SQL CE, and sync with SQL 2008 again?

查看:77
本文介绍了在从SQL CE同步数据并在SQL CE中删除它们并再次与SQL 2008同步后,如何将数据保留在SQL 2008中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是Sync Framework 2.1的新手。我开发了一个使用SQL Server 2008作为中心数据库服务器和许多Window Mobile 5/6设备的应用程序。对于非常高的安全限制,每个移动设备都不能使用WiFi或3G
访问SQL 2008.因此,我必须将主表复制到每个设备中。由于具有巨大的特性和有限的内存大小,在设备完成1天的库存检查并将库存数据同步到SQL Server 2008之后使用


            syncOrchestrator.Direction = SyncDirectionOrder.Upload;


            SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();


如果我删除设备中的所有库存数据并进行其他库存检查,则我再次与SQL Server 2008同步。最新的库存数据可以上传到SQL Server 2008,但之前的库存数据将被删除,因为我已经在设备中删除了
。如何在SQL Server 2008中保留这些清单数据,即使它们已在设备中删除?

解决方案

您的问题与此相关主题:


http ://social.msdn.microsoft.com/Forums/en/syncdevdiscussions/thread/8addcfc0-9a6c-41cd-aa8a-30db1c03dd62


您可以修改更改集在提供者发送之前由提供者枚举。


-


Kyle


 


Hi,

I'm a newbie of Sync Framework 2.1. I develope an application which use a SQL Server 2008 as the center database server and many Window Mobile 5/6 devices. For very very high security restrict, every mobile device can't use WiFi or 3G to access SQL 2008. So, I have to copy main tables into every device. Because of huge properities and limited memory size, after a device finishs 1 day inventory check and sync the inventory data into SQL Server 2008 by using

            syncOrchestrator.Direction = SyncDirectionOrder.Upload;

            SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();

If I delete all inventory data in the device and do other inventory check, then I sync with SQL Server 2008 again. The newest inventory data can be uploaded into SQL Server 2008 but the previous inventory data will be deleted because I already deleted them in the device. How can I keep these inventory data in SQL Server 2008 even though they are deleted in the device?

解决方案

Your question is related to this thread:

http://social.msdn.microsoft.com/Forums/en/syncdevdiscussions/thread/8addcfc0-9a6c-41cd-aa8a-30db1c03dd62

You can modify the set of changes that are enumerated by the provider before they are sent.

--

Kyle

 


这篇关于在从SQL CE同步数据并在SQL CE中删除它们并再次与SQL 2008同步后,如何将数据保留在SQL 2008中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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