tags:

views:

19

answers:

2

There any way to let an application know if there is any specific change on a database table (like an insert, update...) without checking the database in a specific interval? The database server is a SQL Server 2000 Enterprise Version

Something like triggers but on the application level.

Thanks,
rAyt

+1  A: 

You should be able to do it using SQLDependency classes, I would think. Though they are normally used for caching, you could probably do other stuff. Have a read of Using SqlDependency for data change events .

Dan Diplo
Thanks, just added the info that it is a SQL Server 2000 ;)
Henrik P. Hessel
Well, you can still use Cache Dependcy even with SQL Server 2000 (though it's not as good, granted!) See http://www.c-sharpcorner.com/UploadFile/mosessaur/sqlcachedependency01292006135138PM/sqlcachedependency.aspx?ArticleID=3caa7d32-dce0-44dc-8769-77f8448e76bc
Dan Diplo
+1  A: 

Step 1 would be to upgrade to a database server that's not about ten years old. Step 2 would be to use the DDL Triggers technology of SQL Server 2008 to solve the problem.

John Saunders
unfortunately I cannot force my company to buy licenses for new SQL Servers.
Henrik P. Hessel
No doubt. Just make your superiors aware you're left to solve a problem already solved in the later release.
John Saunders