Forum Post: RE: transaction

  • Thread starter Thread starter sseney
  • Start date Start date
Status
Not open for further replies.
S

sseney

Guest
James, I know that if we have the following code structure: REPEAT: DO transaction: FIND FIRST table WHERE table.field1 = " some condition" NO-ERROR. IF AVAIL(table) THEN DO: disp field1 field2. update field2. END. END. FIND FIRST table WHERE table.field = "condition" NO-LOCK NO-ERROR. IF AVAIL(table) THEN DO: display field1 field2. PAUSE. END. END. table starts with share lock, upgrades to exclusive with transaction, then when we do a FIND ... NO-LOCK after the end of the transaction (explicit), the record is no longer in any lock status. Also, when the TRANSACTION ends the record would be downgraded to share lock. Maybe I didn't read the initial question well enough. I know that doing the release or find w/in the scope of the transaction will not do what I posted. But it does downgrade to share lock - after the scope of the transaction ends. Thus if you refind the record, or "release" the record, the share lock would not be held for the rest of the program. Steph From: James Palmer [mailto:bounce-jdpjamesp@community.progress.com] Sent: Monday, April 14, 2014 9:38 AM To: TU.OE.General@community.progress.com Subject: RE: transaction RE: transaction Reply by James Palmer Release does not do what you think it does. Refinding with a no-lock also does not do what you think it does. Stop receiving emails on this subject. Flag this post as spam/abuse.

Continue reading...
 
Status
Not open for further replies.
Back
Top