Kbase P105358: ProDataSet passed by reference refers to wrong instance of ProDataset
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/11/2006 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.0x
SYMPTOM(s):
ProDataSet defined in persistent procedure
Multiple instances of persistent procedure running at the same time
ProDataSet passed by-reference from both instance of persistent procedure to second, different persistent procedure
Procedure call from first instance has not completed when procedure call from second instance is made
Second persistent procedure keeps referring to first instance of first persistent procedure.
CAUSE:
This is expected behavior.
In the current implementation of the by-reference model, a binding is established the moment a ProDataSet is passed by reference. This binding exists until the procedure call where it is established finishes. While a reference is bound this way, it cannot be re-bound to a different ProDataSet.
At the time of writing, it is not considered worthwhile to implement a multiple-binding mechanism.
FIX:
As this is expected behavior, the 4GL code will have to be restructured to avoid the double-binding condition.
Note that in OpenEdge 10.1A or later, the behavior has changed and the rather than failing silently the code will result in error:
<program-name> Attempt to bind twice BY-REFERENCE: dataset or temp-table <name>, already bound to <name> cannot be bound again to <name>. (12763)