Hello,
I have two tables, employe and phone.
Employe
------------
idemploye (autoinc INT)
name (VARCHAR 50)
Phone
------------
idphone (autoinc INT)
idemploye (INT) <-- Foreign key
number (VARCHAR 20)
I linked two TUniQuery components using the MasterSource and MasterFields properties.
My problem is: The user need to write the name of the new Employe, and, before insert it (post), insert the phones for the employe. After it, save all.
Well, I tried to do it, but, because the user don't post the employe, the "idemploye" field is empty (it's a autoinc field, generated by the DB after the post action), and I can't insert a phone registry without the "idemploye" foreign key.
How can I solve this problem? Using temporary "idemploye"?
Thanks for helping and sorry for my english.
Gabriel