本地数据缓存 - 当我向远程数据库添加字段时如何刷新本地数据库?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想让它在同步设计器中工作,如果您取消选择出现问题的表,然后同步然后将其添加回来,它将重建本地缓存文件,一切都会好起来的。
另一种方法是每次将同步更改为整个表,同步然后再更改回来。
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.