What i want to do is whenever, a row is inserted into the database table by another service, the page that is accessing the database should refresh automatically, instead of using timer calls to check, is there a way to do it.
i wanted to in 2 different databases i.e MS SQL Server 2000 and 2008.
What i want to do is whenever, a row is inserted into the database
Share
For SQL 2005 and onwards you’d use SQL Server Query Notifications and the SqlDependency class in C#
There is a tutorial here that you can follow for SQL2005 onwards.
ASP.Net has SqlCacheDependency which is slightly different and works for earlier versions of SQL as well as current versions (it uses polling in SQL2000 and service broker in SQL2005+), but is ASP.Net specific, so you may have difficulty using it in a non web application.