How to Avoid Duplicate Entries during forms run time
user2233Feb 23 2011 — edited Feb 23 2011Hello All
I'm new to oracle forms, i'm using form's 6i...I'm designing a form to show the details of employees using the data block
Tables Used
Employee(EMp Details)
-------------
EMPLOYEE_ID (primary key)
EMPLOYEE_FIRST_NAME
Project(Project Details)
-------------
PROJECT_ID (primary key)
PROJECT_NAME
Employee_project(Emp Project Relations)
--------------------------
EMP_ID (foriegnkey)
PROJECT_ID (foriegnkey)
Ex:
EMP_id Project_id
101 301
101 302
102 303
I'm going to add and delete values from the Employee_project table only
I have run the form successfully with add,delete values
The problem is while adding new values during run time duplicate values is allowed
EX:
The Employee_project table contains already contains the values of
EMP_id Project_id
101 301
101 302
102 303
If i insert the same values during the form run time and press the "*SAVE*" button the same values are added to the table like
EMP_id Project_id
101 301
101 302
102 303
101 301
101 302
102 303
I want to prevent this duplicate entries
How to prevent the duplicate entry?
Is any trigger is used for this validatin?
Help me!