I have created triggers over JDBC that doenot fire. I have checked its validity in the user_objects table and its valid and enabled. I tried creating trigger using the sqlplus console and it successfully fired, so where I could be going wrong? Any idea?
here is my trigger:
create or replace trigger t2
after update of FIRST_NAME on QWERTY
referencing new as newv old as oldv
for each row
begin
if :oldv.FIRST_NAME != :newv.FIRST_NAME then
insert into log values(user,sysdate,'QWERTY','FIRST_NAME',:oldv.FIRST_NAME,:newv.FIRST_NAME);
end if;
end;
I have tried execute(query
) and executeUpdate(query)
functions of Statement
and tried PreparedStatement
too but no luck yet.