>>>If I do this, it will not be a good design because what I am doing is a parent-child data entry. The problem is in the child data entry. TableUpdate on both parent-child tables should only be done when clicking a toolbar button (representing SAVE option.)
>>
>>I think you shouldn't delete otherwise.
>>
>>Why are you trying to delete if the user doesn't say so?
>I am giving them option to delete a particular item by providing a command button below the grid. I think it's a normal design.
OK. What the framework I use does in this case is: ask the user for confirmation (this can be ommited, depending on a form property). If the user clicks "Yes" to confirm, the record is deleted with DELETE, followed by TableUpdate().
I don't dare to go to extreme to say that your approach is a bad design (let me just say that it doesn't appeal to me, personally), but on the other hand, I don't know how to solve the problems that seem to appear as a result, either.
It seems you want a two-step deletion.
Perhaps transactions can help, but the manuals recommend to keep transactions short - to keep the time of the implicit record locking to a minimum.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)