Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in view
Message
 
À
10/05/1999 09:59:14
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00216702
Message ID:
00216721
Vues:
25
Vinod,

You need to make sure that the child table has a primary key and that that is what you've marked as the key field in the view. If you're using the parent table's PK in the child table's view you're really using a foreign key not the primary key. When you delete a record in a view, VFP creates a DELETE statement: DELETE FROM mytable WHERE KeyField=KeyValue. If you are using a foreign key instead of a primary key all records with that key will be deleted if you delete any one of them. I would expect to see the same problem when you update one of the child records.

>I've 2 tables, say
>
>Main - Parent Table
>Trans - Child Table
>
>Main.code=Trans.code (1 to many relation)
>
>If i delete one rec in child view and tableupdate..All the child recs are deleted...
>
>Any way to solve this ???
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform