Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in deleting records in view
Message
From
26/12/1998 01:30:08
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
24/12/1998 16:06:21
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170216
Message ID:
00170462
Views:
21
>>>>I'm facing a very strange problem while deleting records in view...
>>>>
>>>>When I click on the child view grid to delete one rec. and save it...
>>>>
>>>>All the records are getting automatically deleted (for that one parent rec..)
>>>>
>>>>Anybody having any suggestions to solve this..
>>>
>>>How do you delete the record? Using any condition or simple DELETE? Is there any RI involved on DELETE?
>>
>>I just click on the delete mark, provided in grid to delete record..
>
>Check your key field. Your key field must be a unique identifier (primary key) form an updatable view to work correctly. For example,
>
>Structure of View
>
>nKey I
>nFKey I
>
>Data:
>
>nKey nFKey
>
>1 1
>2 1
>3 1
>4 2
>5 2
>6 3
>
>nKey is the primary (unique) key. If I set up my view with nKey as the key field, delete and TABLEUPDATE() then only the records deleted are deleted, as expected. But if I set up my key field as nFKey (which I am not prevented from doing), then deleting record one and TABLEUPDATE() will actually delete records 1-3.
>
>Hope this helps.


Thanks !! U r right, problem is this only...

I'm having one parent table and 2-3 child tables, file structure is :-

Parent table :-
Primary Key
Master Value

Child Table :-
Foreign Key (Parent's Primary Key)
Child Value

I'm not having primary key field in child tables, only foreign key which relates it to parent...

Pls advs. how I can solve this.. as if I remove key field, none of the fields are updatable...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform