>>>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.
Eric Shaneson
Cutting Edge Consulting