Consultor Eletrônico



Kbase P22046: Value is being lost when temp-table is passed to another procedure as INPUT-OUTPUT parameter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/11/2009
Status: Verified

SYMPTOM(s):

Value is being lost when temp-table is passed to another procedure as INPUT-OUTPUT parameter

FACT(s) (Environment):

Progress 8.3X
Progress 9.X
All Supported Operating Systems

CAUSE:

The exact cause is unknown at the time of this writing.

It occurs when the table being passed is a temp-table defined LIKE another table, with some added fields and no indexes have been defined on the original table, for example:

DEFINE TEMP-TABLE tt1 NO-UNDO
FIELD f1 AS CHARACTER.

DEFINE TEMP-TABLE tt2 LIKE tt1
FIELD f2 AS CHARACTER
FIELD f3 AS CHARACTER.

What happens is that the value of the first field added (f2) will not be referenced correctly when the table is passed to the called (or back to the calling) procedure. Instead, the default value for the character type is returned.

FIX:

Upgrade to OpenEdge 10.0A or later release

The issue is no longer seen in those releases

Workaround:
Specify an index within the temp-table definitions of the first table.