Consultor Eletrônico



Kbase P70795: Error 11860 calling procedure with OUTPUT DATASET-HANDLE parameter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/03/2005
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0A
OpenEdge 10.0B

SYMPTOM(s):

Calling internal procedure with OUTPUT DATASET-HANDLE parameter multiple times.

First call completes as expected

In subsequent calls error 11860 occurs in the internal procedure

Error 'Buffer <name> may not appear more than once in any dataset. (11860).'

Internal procedure dynamically creates a ProDataSet

ProDataSet is passed to calling procedure by-value.

ProDataSet being returned is cleaned up properly in calling procedure.

CAUSE:

As the ProDataSet is passed by-value the calling procedure will receive a new copy of the ProDataSet, including new copies of the temp-tables and buffers in it.
This new ProDataSet is cleaned up correctly.
However, the original ProDataSet created in the internal procedure is not cleaned up. And as the original buffer is attached to this ProDataSet this will cause the error 11860.

FIX:

Delete the ProDataSet at the end of the called internal procedure.
Note that as the dataset-handle typed parameter is used, the 4GL will recognize the ProDataSet will be passed back and will postpone the delete until the procedure has ended. (This is essentially the same behavior as seen when passing temp-tables using a TABLE-HANDLE parameter.)