Consultor Eletrônico



Kbase P52230: How to properly release a record within a DO block when running in a persistent procedure?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/02/2009
Status: Verified

GOAL:

How to properly release a record within a DO block when running in a persistent procedure?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

FIX:

To ensure that a record is scoped to a DO block in a persistent procedure and that the transaction ends along with the scope of the buffer, do the following:

DO FOR Customer TRANSACTION: /* Force Strong Scope of Buffer */
FIND FIRST Customer EXCLUSIVE-LOCK. /* Obtain Exclusive-Lock */
UPDATE Name. /* Make Changes to Record */
RELEASE Customer. /* Not Really Needed, but be Safe */
END. /* Transaction & Record Scope Ends */