target: whenever the table in the database c开发者_开发技巧hanges, the treeview will reload the new contents of the table.
Is there any good methods to solve this problem? thank u
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
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..
精彩评论