Regarding Log_History table in asp.net application

Mar 19 2012 3:34 AM
hi,

,i need to create database which has few tables, suppose,one table name is "master_tables" which has table_id and table_name(columns)(table_name column is which all the tables names which is in db).
suppose there is  table name employee which has emp_id, name ,address + two more columns names loghistory_id and tablerow_id..(tablerowid value come from master_tables table_id).. and another table is log_history_table..(which has loghistoryid,tablerowid,rowid,operation(insert,delete,update etc),user_name(application user name),comments) if i insert record through asp.net application,after inserting successfully, the record should be inserted in both the tables means (in inserted table + log historytable)...in log history table i want..tablerowid of table in which  record inserted,rowid,which rowid is inserted ,and which user inserted or deleted... the record and in inseted table historyrowid and table row_id columns should also be update after inserting....i searched alot but i dint get any good result..will you plzzz tell me the proper logic..to solve this task...i used 1 logic,in dal layer after inserting recordd in table i am excuteitng 1 more insert  statement for insert records in log table,but i think its not correct logic..plzz suggest me with proper logic.....

Answers (2)