VPME 7.0a, VPMP 7.0a, VPMS 7.0a FIX: Multi-table View

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

VPME 7.0a, VPMP 7.0a, VPMS 7.0a FIX: Multi-table View

Postby JessicaLawson » Sun Jun 13, 2010 3:25 pm

Subject: VPME 7.0a, VPMP 7.0a, VPMS 7.0a FIX: Deletion does not cascade for multi-table view

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

Symptoms: When a view contains fields from more than one table and a record
is deleted from the view's cursor, related child 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.

Starting at line 391 you will find code that looks like:

OTHERWISE
.
.
.
DO WHILE .T.
.
.
.
DO WHILE .T.
.
.
.
ENDDO
.
.
.
ENDDO
.
.
.


Change this code to:

OTHERWISE
.
.
.
slcSavePKFields = ''
DO WHILE .T.
.
.
.
IF EMPTY(slcSavePKFields)
slcSavePKFields = slcPKFields
ENDIF
DO WHILE .T.
.
.
.
ENDDO
.
.
.
ENDDO
slcPKFields = slcSavePKFields
.
.
.
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