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
You can use sql notifications to do this but you said you don't want to use the broker. Otherwise you can poll, but as mentioned this can cause performance issues.
Another way to do this is using triggers on the database table to touch a file on the filesystem.
exec master..xp_cmdshell 'echo changed > c:\temp\filewatcher.txt'
Then use a FileSystemWatcher as you mentioned you are already doing in your application to receive a notification when the file changes.
There are security permissions that you will need to grant to your Sql Server user to make this possible but if that is acceptable then this will work without using the broker.