CassidyHunt
IS-IT--Management
I have no control over the vendor that wrote the application with the bad code or the ability to make it right. The only fix I have is to make sure the problem code is stopped before it does damage. I can not send an error back to the application because it crashes it. I am trying trying to create a delete before trigger that will make sure that the data being deleted is theirs to delete. If it isn't I just need to reject the delete and not send any notification back. Here is what I have so far but the delete is still going through:
Thanks in advance for the help.
Cassidy
Code:
create or replace trigger DPOL
after delete on clh_temp
for each row
declare
uid varchar2(255);
e_reject exception;
begin
select replace(user,'#',null) into uid from dual;
if :old.user_id <> uid then
raise e_reject;
end if;
exception
when e_reject then null;
end DPOL;
Thanks in advance for the help.
Cassidy