Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I wish to send a mail to group of user once data is entered in a particular table.I am not sure which way to use,should I go for .Net program or should I use db_mail functioanlity of Sql Server.

I was thinking of writing a trigger to send a mail once data is entered in table.
Can you please suggest the best option to do it.

Thanks in advance
Posted
Updated 27-Mar-14 5:55am
v2

1 solution

Triggers are a bad idea, since there is the potential to block the database, and in any case emails require retries etc. and are bound to the network latency.

You are better off creating a service for this with retry and notification.
 
Share this answer
 
Comments
vicvis 1-Apr-14 4:41am    
Thanks for your reply.What you mean to say is taht I should write a window service in .net and ping database from it constantly?but wont that cause much CPU utilization.

I am sorry to ask this as windaow service is not my area of work and i am not preety sure of what CPU will it have.
Mehdi Gholam 1-Apr-14 11:05am    
Cpu utilization will not be a problem.

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