Consultor Eletrônico



Kbase P150720: 4GL/ABL: Error (11877) executing the FILL( ) method of a ProDataSet object
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/7/2009
Status: Unverified

SYMPTOM(s):

4GL/ABL: Error (11877) executing the FILL( ) method of a ProDataSet object

FILL on a dataset buffer not allowed when query in data-source is for the same table <name>. (11877)

Executing code similar to the following sample where the DATASET dsCustOrd and the DATA-SOURCE QUERY qCustomer have the same buffer ttCustomer:
DEFINE TEMP-TABLE ttCustomer LIKE Customer.
DEFINE DATASET dsCustOrd FOR ttCustomer.
DEFINE QUERY qCustomer FOR ttCustomer.
DEFINE DATA-SOURCE srcCustomer FOR QUERY qCustomer.
BUFFER ttCustomer:ATTACH-DATA-SOURCE(DATA-SOURCE srcCustomer:HANDLE).
QUERY qCustomer:QUERY-PREPARE("FOR EACH ttCustomer NO-LOCK WHERE custnum <= 10").
DATASET dsCustOrd:FILL().
FOR EACH ttCustomer :
DISPLAY ttCustomer.custnum ttCustomer.Name.
END.

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

CAUSE:

The dataset buffer can not be the same as the buffer used by the data-source query since that would cause the FILL( ) method of the ProDataSet object to generate and infinite loop.

FIX:

Ensure that the buffers of the DATASET object and the QUERY of the DATA-SOURCE are not the same. For example, in the following code, the DATASET object buffer, ttCustomer, is not the same as the DATA-SOURCE QUERY buffer, Customer:
DEFINE TEMP-TABLE ttCustomer LIKE Customer.
DEFINE DATASET dsCustOrd FOR ttCustomer.
DEFINE QUERY qCustomer FOR Customer.
DEFINE DATA-SOURCE srcCustomer FOR QUERY qCustomer.
BUFFER ttCustomer:ATTACH-DATA-SOURCE(DATA-SOURCE srcCustomer:HANDLE).
QUERY qCustomer:QUERY-PREPARE("FOR EACH Customer NO-LOCK WHERE custnum <= 10").
DATASET dsCustOrd:FILL().
FOR EACH ttCustomer :
DISPLAY ttCustomer.custnum ttCustomer.Name.
END.