Can someone post sample code or tell me how to set up a listener to notify me (trigger an event) if a new row is inserted into a SQL Server database?
I don\'t want
Are you perhaps looking for the SqlDependency class, that lets your code register to be notified when changes occur?
SqlDependencyis ideal for caching scenarios, where your ASP.NET application or middle-tier service needs to keep certain information cached in memory.SqlDependencyallows you to receive notifications when the original data in the database changes so that the cache can be refreshed.
Or does this fall within the realm of things that you're disallowing, it's not entirely clear?