Click here to Skip to main content
14,022,980 members
Rate this:
 
Please Sign up or sign in to vote.
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
   
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190417.4 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100