Consultor Eletrônico



Kbase P153199: Syntax errors when trying to pass Property containing a ProDataSet handle as a DATASET-HANDLE parame
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/23/2009
Status: Unverified

SYMPTOM(s):

Syntax errors when trying to pass Property containing a ProDataSet handle as a DATASET-HANDLE parameter

Compiler fails to resolve object reference correctly when passing as a parameter

Using Property of a Class that contains a DataSet handle

Attemping to pass Property as a DATASET-HANDLE parameter to an internal procedure, for example:

RUN myProc (DATASET-HANDLE obj:HANDLE BY-REFERENCE).

Syntax errors occur when running the code or checking for errors

** Unable to understand after -- "<string>". (247)

** Unable to understand after -- "RUN". (247)

** Invalid statement. (254)

** <Program> Could not understand line <number>. (198)

FACT(s) (Environment):

Property resolves correctly when used elsewhere in the code, for example:

obj:HANDLE:GET-BUFFER-HANDLE(1):NAME
OpenEdge 10.1B
OpenEdge 10.1C
OpenEdge 10.2A
All Supported Operating Systems

CAUSE:

Bug# OE00191262

FIX:

Define a handle variable and assign the value of the Property to the variable.
Pass the handle variable as a DATASET-HANDLE rather than the Property. For example:

Replace this:

RUN myProc (DATASET-HANDLE obj:HANDLE BY-REFERENCE).

With this:

DEFINE VARIABLE h AS HANDLE NO-UNDO.
h = obj:HANDLE.
RUN myProc (DATASET-HANDLE h BY-REFERENCE).