如何监控数据库的变化从而刷新treeview?
target:每当数据库中的表发生更改时,树形视图将重新加载表中的新内容。
有什么好的方法可以解决这个问题吗?感谢你
target: whenever the table in the database changes, the treeview will reload the new contents of the table.
Is there any good methods to solve this problem? thank u
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是 SQL Server,请查看 SqlDependency。以下是 MSDN 的链接,其中包含如何使用 SqlDependency 的示例:
http://msdn.microsoft.com/en-us/library/62xk7953%28VS.80%29.aspx
http://msdn.microsoft.com/en-我们/library/9dz445ks%28VS.80%29.aspx
If your are using SQL Server check out SqlDependency. Here are links to MSDN with examples of how SqlDependency can be used:
http://msdn.microsoft.com/en-us/library/62xk7953%28VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/9dz445ks%28VS.80%29.aspx
我在这里大声思考..如果你不能使用SqlDependency,你可以尝试的下一个是FileWatcher,但你不会知道发生了什么变化..
I'm thinking loud here.. if you can't use SqlDependency, the next thing you can try is FileWatcher, but you won't know what changed..