2007 Dec 02 6:43 AM
Hi experts.
I am working in 4.7 version
I have a requirement in that i have to create two tables with primary key and foreign key relationship.
ex : Department table- fields: dept_no (p), dept_name.
Employee table :- fields : emp_id(p), emp_name, dept_id (f).
Even though I created the tables with primary and foreign key relationship. while creating table entries in Employee table the entries which are not avail for dept_no in Department table it accepting with out showing error, and record is inserting successfully.
can any body help me.
Thanks in advance.
2007 Dec 02 7:50 AM
Hi Miskin,
The field Dept_id should be there in the department table. Set the dept_id as primary key. use the same data element & domain for the field in both the tables.
Regards,
J.Joe
2007 Dec 02 9:12 AM
Ramesh,
In the Employee table, fo Department ID at domain level use the Department Table as the check table.
Regards,
Satish
2007 Dec 02 9:49 AM
2007 Dec 02 9:54 AM
Did you set the check box <b>'Check Required'</b> when you maintain the forign key relation?
Regards,
Satish
2007 Dec 03 6:25 AM
hi
you take dep_no field in emp table with the same data element which r u taken in Depart table for the field dep_no.
And In the EMP table assign dept_no field as foreign key.
Try this and then after do the entry in both tables.
I hope it will done.
Prashant.