VPME 7.0a, VPMP 7.0a, VPMS 7.0a FIX: cascading FK

The place where ProMatrix posts coding tips and fixes. Read only.

VPME 7.0a, VPMP 7.0a, VPMS 7.0a FIX: cascading FK

Postby JessicaLawson » Sun Jun 13, 2010 5:04 pm

Deletion does not cascade when FK is not in PK

Applies to: VPM Enterprise 7.0a, VPM Professional 7.0a, VPM Standard 7.0a

Symptoms: When a FK field in a table/view is not in the PK and a record is
deleted, related records are not deleted by VPM's RI routine.

Resolution: To fix this problem, make the following modification to the
ReferentialIntegrity method of the VPMApp class in the VPMApp class library.
Note: This modification will only fix the problem in your applications, not
within VPM itself.

Change:

IF NOT sllPKFieldChanged AND NOT EMPTY(slcRTVPKFields) AND ;
','+slcFKFld&slcFor+',' $ slcRTVPKFields

To:

IF NOT sllPKFieldChanged AND NOT EMPTY(slcRTVPKFields) AND ;
','+slcRTVFld+',' $ slcRTVPKFields
JessicaLawson
 
Posts: 79
Joined: Sun Jun 13, 2010 1:23 pm

Return to ProMatrix Library

Who is online

Users browsing this forum: No registered users and 1 guest

cron