Consultor Eletrônico



Kbase P127438: Creating dynamic buffer for bound reference-only definition fails
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/19/2010
Status: Unverified

SYMPTOM(s):

Defining temp-table as reference-only

Binding reference using an OUTPUT TEMP-TABLE or OUTPUT DATASET parameter with BIND option

Creating dynamic buffer for the temp-table after the reference has been bound

Using CREATE BUFFER ... FOR TABLE <table-name> syntax

Could not create buffer object for table <table name>. (7334)

FACT(s) (Environment):

OpenEdge 10.1x
All Supported Operating Systems
OpenEdge Category: Language (4GL/ABL)

CAUSE:

When the name is used rather than a buffer-handle to create a buffer, it is possible to get something other than the expected table. Names are not unique and it is likely that the wrong version of the table is returned from the runtime search for the name.

FIX:

In the CREATE BUFFER statement, instead of referring to the temp-table by name, refer to the handle of its default buffer.

Use:

CREATE BUFFER <hdl> FOR TABLE BUFFER <name>:HANDLE.

Or

CREATE BUFFER <hdl> FOR TABLE TEMP-TABLE <name>:HANDLE.

That way the compiler will get a chance to peg the correct table and it will not be left up to chance at runtime. Of course, unless a separate buffer is really needed, it is cheaper to just use:

<hdl> = BUFFER <name>:HANDLE.

That way the <hdl> does not need to be deleted later.