First of all, you shouldn't relate the 2 tables using the person name as the key. If the name change, you loose the relationship.
You should create a primary key in both tables (integer is a good choice). This key would never be presented to the user. You should then create a second foreign key in the child table (invoice). For each customer, you put the customer key in the child foreign key field. You would use this key to link the parent table with the child.
The best way to put the joined result in a grid is to build a view.
HTH
>i am using vfp 3 i have two databases with a common field let us say "pname". the first database has the names and addresses of my customers and the second is the invoice database. i want to set a relation between the two and view it in a list box or a grid box.
>how do i do it?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement