-
populate primary keys
Hi Friends,
I am practising developing and application.
I am just confused about the autogenerated primary-key ID
in a certain table, and how to populated it to the corresponding
child table. It is like this:
A. Parent Table.
I got an employee table EMP (emp_id, name)
with primary key emp_id , auto generated by a trigger.
B. Child Table.
I got a 2nd table EMP_LOANS (loan_id,emp_id,amount)
With foriegn key emp_id renferences EMP.emp_id
with primary key loan_id , auto generated by a trigger.
My problem is, when i encode data to the 2 tables, i only
supply the EMP.name and EMP_LOANS.amount because the id's
are auto generated.
So what i see(enterable) in the screen form are just the fields
[name, amount]
How do i pick up the EMP.emp_id and populate it to
EMP_LOANS.emp_id?
Thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|