Consultor Eletrônico



Kbase P117211: Error 247 when using VALUE in the USING option of the BUFFER-COPY statement
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/03/2009
Status: Unverified

SYMPTOM(s):

Error 247 when using VALUE in the USING option of the BUFFER-COPY statement

** Unable to understand after -- "BUFFER-COPY". (247)

BUFFER-COPY source USING VALUE(result-field) TO target.

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

CAUSE:

Syntax error

FIX:

To copy just a list of fields from one buffer to another make a procedure ( or function ).
Example:
PROCEDURE myBufferCopy:
DEFINE INPUT PARAMETER hbSrc as handle.
DEFINE INPUT PARAMETER hbDest AS HANDLE.
DEFINE INPUT PARAM cList AS CHARACTER.

DEF VAR vi AS INT.
DEF VAR ctmp as CHARACTER.
DO vi = 1 TO NUM-ENTRIES( cList ):
/* get the field name */
ctmp = entry( vi, clist ).

/* copy the field from one buffer to another */
ASSIGN hbDest:BUFFER-FIELD( ctmp ):BUFFER-VALUE = hbSrc:BUFFER-FIRLD( ctmp ):BUFFER-VALUE.
END.
END PROCEDURE.