November 17th, 2003, 08:51 AM
Trouble trying to insert new rows into a table from Forms Developer
I have two datablocks (student and course_section). The premise is to update a detail table, Enrollment with a student id#(s_id), course section id#(c_sec_id) and a NULL value for Grade. I have a Save button with the following code behind it:
insert into enrollment values
(:student.s_id, :course_section.c_sec_id, NULL);
I recieve the following error - FRM-40600: Record has already been inserted. I have tried various combinations of student id's and section id's that I know do not exist in the table and I continually recieve this message. Any thoughts?
November 18th, 2003, 05:59 PM
I want to add a default employee in the each department if there is no employee in the department. I typed the following pl/sql behind the button and it works.
SELECT count(*) INTO count FROM emp
WHERE deptno = :dept.deptno;
if count=0 then
insert into emp (empno,ename,sal,deptno)
I dont know what is the problem in your form. can you please send me little bit more detail, like what is the relatioship beetween your table and how many constraints each table has?