Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>>>>>>In the brief period when I used DBC/DBF I never used the RI or triggers. Didn't trust them. (Steve Sawyer once gave a great presentation on why that distrust was well-founded)
>>>>>>
>>>>>>Now use them even less :-) but a couple quesitons
>>>>>>
>>>>>>Are there any circumstances when they do no fire.
>>>>>>
>>>>>>For example ; Sql insert / delete from a table. Should it fire the RI code to delete children?
>>>>>>
>>>>>>Browse, mark record as deleted. RI fire?
>>>>>>
>>>>>>Manual insert / update ?
>>>>>>
>>>>>>TIA
>>>>>
>>>>>I believe in all these cases the RI triggers should fire. Did you find a case when it's not so?
>>>>
>>>>I'll have to retest, but I think if one browses a parent, marks a row for delete, the casade delete does not happen in children but I will have to test again.
>>>
>>>Try re-testing after moving a record pointer.
>>
>>Maybe that will clear up the problem but it shouldn't be necessary to do that. The cascade to the child table should occur immediately following a DELETE in the parent table.
>
>The trigger only fires when the record is updated on the table. This means when a row if row- or table buffered, you first need to issue a TABLEUPDATE(). Otherwise, I've never encountered the problem as described here.
Yes, I know about TABLEUPDATE(). My point was that the deletes in the parent and child tables should occur "simultaneously." There should be no need to move the record pointer.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement