
For sure that auditing the insert , update , delete transaction is ver cretical issue for some customers although the auditing may little preformance reduction , but they are still interested in monitoring the DML transactions of the application user ,
OF Course we know that there are two main options about auditing
First is the Database audit it self ( you can enable this feature for selected or all tables of your application )
Second is the Forms side audit and this is the option which we provide dynamic solution
you need dynamic and effective design to implement this auditing with minumum coding
at first you need two tables ( gn _audit_master , gn_audit_detail ) two table instead of one to reduce the storage required by this program.
- Note that all column names and table names are related to your environment i.e. you can choose any name you want
after that you will make a procedure to insert the master record detail ( like the current form , the current user , the current date , .... )
- then you can start to code the procedure that will implement this functionality
- in your form create Post_insert-trigger in the block you want to audit and
http://www.4shared.com/file/127826208/fabb5f2d/Audit_program.htmlcall your procedure and pass the operation type 'I' means insert
- in your form create Post- upate in the block you want to audit and call your procedure and pass the operation type 'U' means update
- in your form create Pre-delete ................................
-- usage note :
1- if your primary key item get its value from before insert trigger on the database , so you must change the block property DML_return_value to 'Yes'
2- the code contains ' substr , 'string' these literals are related to My environment and you can customize your code according to yours
3- the program enable you to track all operation with all values even the record is deleted and the ability to restore the deleted row with the same values exactly
4- after you understand the functionality of the program you can adjust it to add new functionaliyt , edit existing functionality, or delete exisiting feature.
the code and scripts available on this link :
No comments:
Post a Comment