Consultor Eletrônico



Kbase P187399: Misleading error 7365 with ADD-LIKE-COLUMN method
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/05/2011
Status: Unverified

SYMPTOM(s):

Misleading error 7365 with ADD-LIKE-COLUMN method

<fieldname> BUFFER-VALUE argument must be valid array index, less than or equal to field extent <number>. (7365)

Error 7365 appears due to a field name problem when error 9161 should be displayed.


In ADD-LIKE-COLUMN, could not find source field <name>. (9161)

The following code (with sports2000 database) will reproduce the error 9161. But remove the comment around adding the Lastfield field to the temp table, and error 7365 will appear.

DEFINE VARIABLE hTT AS HANDLE NO-UNDO.
DEFINE VARIABLE bTT AS HANDLE NO-UNDO.
DEFINE VARIABLE q AS HANDLE NO-UNDO.

DEFINE VARIABLE browse-1 AS HANDLE NO-UNDO.
CREATE TEMP-TABLE hTT.
hTT:ADD-LIKE-FIELD("RepName","salesrep.repname").
hTT:ADD-LIKE-FIELD("MonthQuota","salesrep.monthquota").
/*
hTT:ADD-NEW-FIELD("LastField","CHARACTER").
*/
hTT:TEMP-TABLE-PREPARE("hTempTable").
bTT = hTT:DEFAULT-BUFFER-HANDLE.

CREATE QUERY q.
q:SET-BUFFERS(bTT).
q:QUERY-PREPARE("FOR EACH hTempTable").
DEFINE FRAME f1
WITH SIZE 78 BY 18.

CREATE BROWSE browse-1
ASSIGN
FRAME = FRAME f1:HANDLE
X = 2
Y = 2
WIDTH = 76
DOWN = 8
QUERY = q:HANDLE
TITLE = "Dynamic Browse with dynamic query"
SENSITIVE = TRUE
VISIBLE = FALSE
MULTIPLE = TRUE
READ-ONLY = FALSE
SEPARATORS = TRUE.

browse-1:EXPANDABLE = NO.
browse-1:QUERY = q.
browse-1:ADD-LIKE-COLUMN("hTempTable.repname",1).
browse-1:ADD-LIKE-COLUMN("hTempTable.monthquot[2]",2).


FACT(s) (Environment):

The field being used in the ADD-LKE-COLUMN method is NOT sequentially the last field in its table.
There is a typo in the field name being used in the ADD-LIKE-COLUMN method. For example 'MonthQuot' instead of 'MonthQuota'.
The field being used in the method is a subscript of an array field. For example:

browse-1:ADD-LIKE-COLUMN("hTempTable.monthquot[2]",2).
All Supported Operating Systems
OpenEdge 10.2x

CAUSE:

Bug# OE00207423

FIX:

None at this time