VPME 6.0b, VPMP 6.0b, VPMS 6.0b FIX: Status error

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

VPME 6.0b, VPMP 6.0b, VPMS 6.0b FIX: Status error

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

Subject: VPME 6.0b, VPMP 6.0b, VPMS 6.0b FIX: Status error information not from current data session

Submitted by: Markus Winhard

Applies to: VPM Enterprise 6.0b, VPM Professional 6.0b, VPM Standard 6.0b

Symptoms: When an error occurs, information about the tables and views that
are open at the time of the error is recorded in a record in the Errors
table. This Status information can be viewed by clicking the Status button
on the Errors form. What is happening is that the Status information from
the default data session is being recorded instead of the data session in
use at the time of the error.

Resolution: To fix this problem, make the following modifications to the
VPMApp class in the VPMApp class library.

1. In the IssueOnError method, change:

ON ERROR _SCREEN.oApp.RunAdminTool('ERROR',ERROR(),;
MESSAGE(),SYS(2018),MESSAGE(1),SYS(16),PROGRAM(),;
LINENO(1),LASTKEY(),VARREAD(),WOUTPUT())

To:

ON ERROR _SCREEN.oApp.RunAdminTool('ERROR',ERROR(),;
MESSAGE(),SYS(2018),MESSAGE(1),SYS(16),PROGRAM(),;
LINENO(1),LASTKEY(),VARREAD(),WOUTPUT(),;
SET('DATASESSION'))

2. In the RunAdminTool method, change:

LPARAM stcID,stP1,stP2,stP3,stP4,stP5,stP6,stP7,stP8,stP9,stP10

To:

LPARAM stcID,stP1,stP2,stP3,stP4,stP5,stP6,stP7,stP8,stP9,stP10,stP11

3. In the RunAdminTool method, change:

OTHERWISE
slRetVal = This.&slcRunMethod(stP1,stP2,stP3,stP4,stP5,stP6,stP7,;
stP8,stP9,stP10)

To:

CASE slnNumPar = 11
slRetVal = This.&slcRunMethod(stP1,stP2,stP3,stP4,stP5,stP6,stP7,;
stP8,stP9,stP10)
OTHERWISE
slRetVal = This.&slcRunMethod(stP1,stP2,stP3,stP4,stP5,stP6,stP7,;
stP8,stP9,stP10,stP11)

4. In the AdminTool_ErrorHandling method, change:

LPARAM stnErrNum,stcMess,stcMessPar,stcCode,stcProg16,stcProg,;
stnCurLine,stnLastKey,stcVarRead,stcWOnTop

To:

LPARAM stnErrNum,stcMess,stcMessPar,stcCode,stcProg16,stcProg,;
stnCurLine,stnLastKey,stcVarRead,stcWOnTop,stnDataSessionID

5. In the AdminTool_ErrorHandling method, before:

DO CASE
CASE slcAction = 'QUIT'

Add:

This.SetDataSession(stnDataSessionID)
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