Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 Tables, One Form
Message
 
À
27/05/1999 15:08:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00223537
Message ID:
00223703
Vues:
24
>I don't know how your form is set up. The way I normally build a parent-child form is by placing the parent control on the form and adding a read-only grid for the child. I would add 3 command button: Add, Modify and Delete. The first two buttons would display a modal form to add all the information about the child.
>
>In the Save method of the child form, I would issue a INSERT-SQL to the child table if the Add button was selected in the parent table.
>
>In the Save method of the parent form, I would put a TableUpdate() for the parent table and a second one for the child table. TableRevert() for the Cancel method.
>
>Naturally, this require a record/table buffering for the parent table and table buffering for the child table.
>
>HTH
>
>>Thanks for your reply!:) I really needed someone to verify my fears...ok, I see what you are saying, can you give an example, or suggestion on how to do this?


Well wait just a sec...isn't one of the things about relational databases is that you can have several tables, all linked together in a DBC, and can be edited, AND added to, without adding to each individually? This seems wierd to me...I mean, if you've got a table that has invoice #s, customer #s, etc. and then you have seperate tables that have the details about that invoice #, customer, etc. and you're entering invoices and customer info on one form, that you have to do an insert for EACH table? Please straighten my logic/reasoning...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform