Click here to Skip to main content
15,921,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created software in asp.net where user logs in according to their role and fill the information in form. after saving the form the database is updated. I want to get all the changes the user has done and mail it to the administrator.
The form user fills is long form where the information is store in different tables of databse.
Is there any way I can catch all information and mail...

Or AnyOne have any idea How can I achive this task... ????
Plz Help...
Posted

1 solution

You can do this. There are two main streams you can follow:
A) if you have a DAL, or BL, you can extend it to do this for you. But I suppose you have no such thing.
B) if your DBMS supports it, you can use triggers, to catch events on DB side. Not all DBMS support triggers. You haven't specified what you are using. I hope for you, you are using MS SQL Server, because there is easier to program such features either in its procedural language or even it .net
 
Share this answer
 
Comments
sanchu90 21-May-12 3:33am    
Im using Ms-Sql. plz elaborate ur answer i.e when to create triggers or after creating it how can I catch in my coding etc....
Zoltán Zörgő 21-May-12 3:45am    
Read this articles:
http://www.datasprings.com/resources/articles-information/creating-email-triggers-in-sql-server-2005
http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
http://www.mssqltips.com/sqlservertip/1523/how-to-setup-sql-server-alerts-and-email-operator-notifications/

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