I am working on an application that requires different levels of an audit trail. There are 3 levels:
1. Record updates and deletions to the database in the background. I have this set up using the appropriate triggers.
2. The user must select a reason for the update or deletion from a pull down list before the update or deletion is commited. The update or deletion is then recorded in the audit trail along with the reason.
3. Same as #2 but the user must also enter their Oracle password and the password is then verified.
I cannot figure out how to handle settings 2 & 3 with just triggers. I have written stored procedures to write the audit trail records but I am having trouble accessing the old and new values for a field on a form.
Do I need to use cached updates? What is the best event to trigger the needed code? What is the easiest way to get the old and new values and be able to roll back changes if the reason is not valid or the password is not valid?
Thank you very much for your help.
John
1. Record updates and deletions to the database in the background. I have this set up using the appropriate triggers.
2. The user must select a reason for the update or deletion from a pull down list before the update or deletion is commited. The update or deletion is then recorded in the audit trail along with the reason.
3. Same as #2 but the user must also enter their Oracle password and the password is then verified.
I cannot figure out how to handle settings 2 & 3 with just triggers. I have written stored procedures to write the audit trail records but I am having trouble accessing the old and new values for a field on a form.
Do I need to use cached updates? What is the best event to trigger the needed code? What is the easiest way to get the old and new values and be able to roll back changes if the reason is not valid or the password is not valid?
Thank you very much for your help.
John