数据库同步后未更新本地数据库 [英] Local Database not updated after Database synchronization

查看:224
本文介绍了数据库同步后未更新本地数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2010对话框使用本地数据库缓存,参考这个教程。当我按照教程中指定的所有步骤运行代码进行同步时,我也得到了更新结果,但我的本地数据库(Compact)仍未更新。它是从SQL服务器中选择值吗?如果没有,那么为什么我的本地数据库不会更新。有人告诉我改变`复制到输出目录到复制永远'将有所帮助,但我没有解决方案结束。



这两行代码的作用。 />


I am using local database cache using Visual studio 2010 dialogue Box by referring this tutorial. When i run code for synchronization by following all the steps as specified in tutorial everything works, I also get updated result but my local database(Compact) is still not updated. Is it selecting values from SQL server?. If not then why my local database is not updated. Someone told me changing `Copy to output directory to Copy always` will help out but i am ended with no solution.

What these two line of code do.

// Call SyncAgent.Synchronize() to initiate the synchronization process.
           // Synchronization only updates the local database, not your project's data source.
           LocalDataCache1SyncAgent syncAgent = new LocalDataCache1SyncAgent();
           Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize();





如果他们按照评论中的说明执行操作,那么为什么我的本地数据库不会更新。



If they do what is explained in comments then why my local database is not updated.

推荐答案

这篇关于数据库同步后未更新本地数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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