Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there's anyway i can write a windows service in C# that will be trigger when the new record get inserted into Database.
Posted

1 solution

Yes there is a way, you can use a SQL Dependency in the windows service.
Although this article :http://www.codemag.com/article/0605061[^] has all it's code examples in VB.Net, I did find it an excellent article to introduce this premise.

There are certain requirements that you need to ensure have been set up with regards to SQL and database owners else the service broker might fail, as happened to me recently.

Hope that helps/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900