如何监控数据库的变化从而刷新treeview?

发布于 2024-08-25 12:45:46 字数 73 浏览 5 评论 0原文

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 技术交流群。

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

发布评论

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

评论(2

冷月断魂刀 2024-09-01 12:45:46

如果您使用的是 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

感受沵的脚步 2024-09-01 12:45:46

我在这里大声思考..如果你不能使用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..

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