Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm facing a problem in inserting values in ndatabase using oracle form.

I placed a trigger When-Button-Pressed against save button in the form but I don't know what is actualy going wrong.

The code in the trigger is as:
DECLARE
  --declarations;
  fn varchar2(400);
  fa varchar2(40);
BEGIN
 -- INSERT_RECORD;
 fn:= :BLK_IIU_FACULTY.Fac_Name;
 MESSAGE ('faculty name '||fn);
 fa:= :BLK_IIU_FACULTY.Fac_Abbrv;
 insert into IIU_Faculty Values(FacultySeq.nextval,fn,fa);
COMMIT_FORM; --COMMIT;
 select FAC_NAME into fn from IIU_FACULTY where FAC_ID=3;
 MESSAGE(fn);
END;
Posted
Updated 19-Jan-11 21:37pm
v3
Comments
Dalek Dave 20-Jan-11 3:37am    
Edited for Readabiity and Spelling.
Dave Kreskowiak 20-Jan-11 11:32am    
So what's the problem??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900