Consultor Eletrônico



Kbase P166925: Procedure that defines temp-table parameter with BIND option loses access to object instance
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/06/2010
Status: Unverified

SYMPTOM(s):

Procedure that defines temp-table parameter with BIND option loses access to object instance

Temp-table is defined as REFERENCE-ONLY

Procedure has internal procedure for temp-table with BIND option

Internal procedure is called from elsewhere in the code

Call to internal procedure specifies BY-REFERENCE for temp-table parameter

Procedure does not have access to temp-table after internal procedure finishes

Attempt to reference uninitialized temp-table. (12378)

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems

CAUSE:

This is expected behavior.

A BY-REFERENCE pass is expected to only last for the duration of the routine (function/method/procedure) call. Note that the BY-REFERENCE option on the routine invocation overrides the BIND option in the routine's parameter definitions.

FIX:

Specify BIND instead of BY-REFERENCE in the routine invocation statement.

The BIND option explicitly establishes a binding between a REFERENCE-ONLY definition and an actual object instance that persists until either the definition or the object is deleted.