Consultor Eletrônico



Kbase P96531: ADM2: hitting error 42 when commiting many records without handling an error returned by submitRow
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/11/2004
Status: Unverified

FACT(s) (Environment):

Progress 9.1C

SYMPTOM(s):


bfx: Field too large for a data item. Try to increase -s. (42)

ADM2

Progress 9.1C08

Stack Trace reads:
submitRow adm2/data.p at line 7822
submitCommit adm2/data.p at line 4700
anyMessage adm2/smart.p at line 2518

Creating many records via an open SDO by calling submitRow in a loop

CAUSE:

One record raises an error in a valiadation procedure, but the FALSE returned value of SubmitRow is ignored. The ADM2 finds out that there has been an error and keeps adding error messages to the ADM2 message facility up to the 32k limit in a variable.

FIX:

Handle the error returned by submitRow and fetch the ADM2 messages as illustrated bellow:
DEFINE VARIABLE lw_submitok AS LOGICAL NO-UNDO.
lw_submitok = DYNAMIC-FUNCTION('submitrow':U IN h_dfnmentinc,
INPUT ENTRY(1,listavalores), INPUT listanuevos).
IF NOT lw_submitok THEN DO:
DEFINE VARIABLE cw_message AS CHARACTER NO-UNDO.
ASSIGN cw_message = DYNAMIC-FUNCTION('fetchMessages':U IN
h_dfnmentinc) NO-ERROR.
IF cw_message <> "" THEN DO:
cw_message = REPLACE(cw_message,CHR(4)," ").
cw_message = REPLACE(cw_message,CHR(3),"~n").
cw_message = cw_message + "~n" + "Nsmina: " +
STRING(tt_incidencias.nomina_id).
MESSAGE cw_message
VIEW-AS ALERT-BOX ERROR BUTTONS OK.
END.
RETURN ERROR.
END.