How to find out when or who updated my Database.
-
Hello: Could someone point me to the right track..I have creat ASP.NET in VS2005 web site that ppl will log in and If the user update the Database I would like it to display that user name on the page. Thanks, Eyungwah.
The most common way of doing this is to use triggers on the table you want to check for changes in, and then save date and username in an other table. You can also add two fields, last modifiedBy and lastModifiedTime to each table you want to check for changes in, in addition you add a trigger and copies these values to an other table eg: TableNameLog if the original table was named TableName. If you do not wan to use triggers you have to save the information in two places when a save occurs. You can use client-code or storede procedrues in the database. /M
-
The most common way of doing this is to use triggers on the table you want to check for changes in, and then save date and username in an other table. You can also add two fields, last modifiedBy and lastModifiedTime to each table you want to check for changes in, in addition you add a trigger and copies these values to an other table eg: TableNameLog if the original table was named TableName. If you do not wan to use triggers you have to save the information in two places when a save occurs. You can use client-code or storede procedrues in the database. /M
Thank you Mattias for your replied. I have a Login.aspx page. On my default.aspx page which is contained Database Table. I was wondering if you could please give me some sample code. I wanted to add "Last Modified By" field table and if the Logged in user update the table then have his/her name display under that "Last Modified By". Thanks again for your help. Eyungwah