Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends

I don't know in which section I should ask this question, at language part of SQL part. The problem is my system has a table in which my system logs success result as well false result. Now what I want when my system found 10 error result continuously in table, system should send a mail notification to me about this.

Thanks in advance
Posted

1 solution

For something like this I would recommend writing either a Windows Service or a Windows Command Line utility. If you do a service, then use a timer to fire off however often you want to check the count. If you use a Utility, then you can schedule it using Windows Scheduler.

Personally I don't like using Sql to send emails, although it can. I like having that logic be outside in C# code which is why you should do a service or windows app.

Or, you could look at what process is writing records to that table and put the logic there.

Or, you could use a trigger and keep it all in sql and using the email feature of Sql but I would recommend against that.
 
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