>SELECT (lcParentWkArea) >pcParentDBF=dbf() >pnParentRec=recno() >STORE CID TO lcParentID,pcParentID >pcParentExpr="CID" >lcChildWkArea=riopen("users","cgroupid") >IF lcChildWkArea<=0 > IF _triggerlevel=1 > DO riend WITH .F. > ENDIF at the end of the highest trigger level > RETURN .F. >ENDIF not able to open the child work area >pcChildDBF=dbf(lcChildWkArea) >llRetVal=!SEEK(lcParentID,lcChildWkArea) >SELECT (lcChildWkArea) >pnChildRec=recno() >pcChildID=CGROUPID >pcChildExpr="CGROUPID" >IF !llRetVal > pnError = rierror(-1,"Delete restrict rule violated.","","") >ENDIF >=rireuse("users",lcChildWkArea) >IF NOT llRetVal > IF _triggerlevel=1 > DO riend WITH llRetVal > ENDIF at the end of the highest trigger level > SELECT (lcStartArea) > RETURN llRetVal >ENDIF >IF _triggerlevel=1 > do riend with llRetVal >ENDIF at the end of the highest trigger level >SELECT (lcStartArea) >RETURN llRetVal >** "End of Referential integrity Delete trigger for" user_group >