本地数据缓存 - 当我向远程数据库添加字段时如何刷新本地数据库?

发布于 2024-08-09 01:23:37 字数 289 浏览 2 评论 0原文

我在 ASP.NET 3.5 环境中使用本地数据缓存。我通过添加新字段对主数据库进行了更改。

我双击项目中的 .SYNC 文件以再次启动本地数据缓存向导。向导启动,我单击“确定”,希望它能够重新查询我的数据库并将新字段添加到本地数据库文件中。

相反,我收到一条错误消息:“同步数据库失败,并显示消息:无法枚举 DbServerSyncProvider 上的更改...”

我知道让事情再次正常工作的唯一方法是删除 .SYNC 文件以及本地数据库,然后从头开始。

必须有一种更简单的方法...有人知道吗?

I'm using a Local Data Cache in an ASP.NET 3.5 environment. I made a change in my main database by adding a new field.

I double click on my .SYNC file in my project to startup the Local Data Cache wizard again. The wizard starts and I click OK with the hopes that it'll re-query my database and add the new field to the local database file.

Instead, I get an error saying "Synchronizing the databae failed with the message: Unable to enumerate changes at the DbServerSyncProvider..."

The only way I know to get things working again is to delete the .SYNC file along with the local database and start it from scratch.

There's got to be an easier way... anyone know it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乱了心跳 2024-08-16 01:23:37

如果您想让它在同步设计器中工作,如果您取消选择出现问题的表,然后同步然后将其添加回来,它将重建本地缓存文件,一切都会好起来的。

另一种方法是每次将同步更改为整个表,同步然后再更改回来。

If you want to get it to work in the sync designer, if you deselect the table giving you the problem and then sync and then add it back, it will rebuild the local cache file and all will be well.

Another way is to change the sync to to Entire table each time, sync and then change it back.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文