Kbase P18556: WebSpeed agents remain busy when executing an specific application module
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/03/2005 |
|
Status: Unverified
SYMPTOM(s):
WebSpeed agents remain busy when executing an specific application module
Due the agents remain busy some other requests cannot be attended.
CAUSE:
One of the queries on the application module was making reference to one variable which had the same name as the table field.
FIX:
Example of the problem:
ORIGINAL CODE:
FOR EACH escolar.se_mvaca WHERE (escolar.se_mvaca.expediente = expediente) AND
(escolar.se_mvaca.materia = mymateria) USE-INDEX imvaexp NO-LOCK:
IF (INT(escolar.se_mvaca.ciclo) < ciclo) THEN DO:
ciclo = INT(escolar.se_mvaca.ciclo).
ninsc = escolar.se_mvaca.numinsc.
END.
END.
/* Note that the IF condition used the variable "ciclo" and also the field table with the same name. */
FIXED CODE:
FOR EACH escolar.se_mvaca WHERE (escolar.se_mvaca.expediente = expediente-v)
AND(escolar.se_mvaca.materia = mymateria) USE-INDEX imvaexp NO-LOCK:
IF (INT(escolar.se_mvaca.ciclo) < ciclo-v) THEN DO:
ciclo-v = INT(escolar.se_mvaca.ciclo).
ninsc = escolar.se_mvaca.numinsc.
END.
END.
/* Here the code now uses the variable "ciclo-v" instead of "ciclo".