0

I have a form to fill details, those records will inserted in db with columns name, email, phone, ismailsent. now i want to send an email to my admin team if any new record inserted into DB. any better technique like windows service, i want it to be very clean. any help appriciated

charan
  • 21
  • 5

2 Answers2

0

You don't give any details, but I guess you're looking for something like a database trigger. I don't know which DBMS you're using, but take a look at this post: C# / SQL Listener to tell me if a row has been inserted into a table

Community
  • 1
  • 1
Rob
  • 11,492
  • 14
  • 59
  • 94
  • Then this is what you need: http://stackoverflow.com/questions/1355921/sql-server-2008-help-writing-simple-insert-trigger – Rob Jun 12 '13 at 07:25
0

There are a few options for achieving this functionality, you could have a windows service or a web service which you invoke after you insert your record successfully, or you could use the SQL Server 2008 build in functionality (sp_send_dbmail), but you first need to configure it. Here are some posts that might help you:

Hope it helps. Cheers!

Community
  • 1
  • 1
lex87
  • 1,276
  • 1
  • 15
  • 33