views:

33

answers:

2

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

A: 

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

Andrew Bezzub
thank u, I'll have a try
jack
I found the database I use doesn't support the class sqldependency. Is there any other methods to solve that problem?
jack
A: 

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..

pabloide86