Consultor Eletrônico



Kbase 11778: When a record gets disconnected: REPEAT vs. REPEAT TRANX
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
When a record gets disconnected: REPEAT vs. REPEAT TRANX

Repeat transaction:
find next customer.
display name.
end.

display recid(customer) with frame x.

The above situation will give you the recid of the last customer.

Repeat:
find next customer.
display name.
end.

display recid(customer) with frame x.

The above situation will NOT give you the recid of the last customer.


The 2 procedures above are weak scoped.The customer record buffer is
scoped to the procedure block, not the repeat block. The reason you
see the recid of the last customer in situation 1 and not in situation
2 has to do with when the record gets disconnected.

In the first procedure, the record gets disconnected after the end of
the block in which the buffer is scoped to, therefore we do not
disconnect the record until the end of the procedure.

In the second procedure, the record gets disconnected at the end of
each iteration of the repeat block and the record buffer is cleared.
No transaction is active at the end of the repeat block and the record
buffer is cleared.

Progress Software Technical Support Note # 11778