martin
martin

Reputation: 653

Retrieve data from database

I need to use C# to get data from database(sql) and the data in database is updated every few seconds. So do I have to make a loop or there is a better way to do that? Is it possible that when database is updating, the program can wait until it finishes updating? thx!

Upvotes: 1

Views: 284

Answers (1)

Samuel Jack
Samuel Jack

Reputation: 33280

Take a look at Query notifications in ADO.Net. These allow your code to be notified by SQL Server whenever the results of a particular query change.

Upvotes: 3

Related Questions