You do not need additional update or delete code in RI for update or delete unless you have exceptional needs beyond restrict or cascade.
The RI will append a new child record *if* you put the code to do so in your "addchild()" RI procedure. For example -- Assuming TestDad is the parent and TestSon is the child (and I have Addson() defined as the Insert trigger on Testdad)
PROCEDURE addson
LOCAL lWasused
IF USED('testson')
lWasUsed=.T.
ELSE
lWasUsed=.F.
ENDIF
INSERT INTO testson (pk,fk,sonname) VALUES (SYS(2015),testdad.pk,"Son of "+testdad.name)
IF !lWasUsed
USE IN testson
ENDIF
RETURN .T.
>How about the update and delete trigger? Should I have procedure to control the trigger in the table or should I set it in the RI between the two relationship?
>
>By the way, will the RI append a new record in the child table when I append a new one in the parent table?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05