URGENT, VERY VERY URGENT [message #81391] |
Thu, 13 February 2003 02:02 |
Imran
Messages: 56 Registered: November 2001
|
Member |
|
|
hello Guys,
I have a problem. I like to do auditing in forms, like if any update(s) or delete(s) is perform in form i like to archive that. I do that but i do in a fashion in which the whole record is archived but i like to do in column wise fashion. If i choose database trigger than i have to write many if-then-else. I have many columns in table so i like to avoid that method. IF any one have other idea than plz let me know.
And one more thing is it possible that any view containing the records that which column is updated or deleted in a table. Any help will be appreciated.
Thanks
Imran
|
|
|
Re: URGENT, VERY VERY URGENT [message #81398 is a reply to message #81391] |
Thu, 13 February 2003 09:14 |
magnetic
Messages: 324 Registered: January 2003
|
Senior Member |
|
|
slm imran,
whats your goal for archiving?
for example,counting how many updates are done or wich record is updated by whom?
in the last case you better archive only the primarykey columns of a table, no need for the whole record.
but oracle has his own tracing option.
the database initializationfile has a parameter like audit..[[or something like that]] you should set that to TRUE and all dml statements will be monitored. But this will consume harddisk space..
if that aint what ya want.. like to see your form to be able to find a better solution..
|
|
|
Re: URGENT, VERY VERY URGENT [message #81402 is a reply to message #81391] |
Thu, 13 February 2003 15:16 |
Stefan Mueller
Messages: 11 Registered: January 2002
|
Junior Member |
|
|
not many know that in the UPDATING function you can specify the columnname to see if it is updating!:
in your trigger you can use:
begin
if inserting then
...
elsif deleting then
elsif updating then
IF UPDATING('columnname') THEN ... end if;
..
end if;
end;
|
|
|