Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in view
Message
 
To
10/05/1999 09:59:14
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00216702
Message ID:
00216721
Views:
26
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 ???
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform