Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 Tables, One Form
Message
 
À
28/05/1999 09:04:23
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:
00223930
Vues:
16
Thank you:) I guess I had assumed too much from the relational database system:) Knowing my limits helps to see what I need to do:)

>No, relation databases doesn't mean that it will add records to your tables automatically. It just ensure, via relational integrity, that the database will allways be consistent. If you go in the relational integrity form in the database designer and go on the Rules for Inserting tab, you will see only 2 choices: Restrict and Ignore. That only mean that you can restrict adding a child without a parent or admit it. Nowhere it offer you to add childrens automatically.
>
>Even if it could, how will it do that? What value will it put in the different fields of the child? A parent can have zero or many childs. How does the database know that? By specifically inserting as many child that you need in the child table.
>
>BTW, don't forget to use transactions (BEGIN TRANSACTION, ROLLBACK, END TRANSACTION) when playing with parent-child scenario. That way, if something go wrong after you added a child, the database will not be left in a unconsistent state.
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform