KMoody
Member
I'm having some trouble with a record's locking scope.
Our table SYSMST2 keeps track of the next available order number. Using OE-01A.P, we need to increment SYSMST2.nextord in each time we enter a new order in MAIN.P below. We want to unlock SYSMST2 immediately after incrementing SYSMST2.nextord so that other users can access the table. However, SYSMST2 doesn't unlock until the user leaves the main repeat lock in MAIN.P.
How can we scope OE-01A.p so that SYSMST2 unlocks properly? I've tried using RELEASE SYSMST2 and FIND CURRENT SYSMST2 NO-LOCK NO-ERROR at the end of OE-01A.P, but neither works.
EDIT: I can't add my code to my post for some reason. I keep getting an "Oops! We ran into some problems" message.
Our table SYSMST2 keeps track of the next available order number. Using OE-01A.P, we need to increment SYSMST2.nextord in each time we enter a new order in MAIN.P below. We want to unlock SYSMST2 immediately after incrementing SYSMST2.nextord so that other users can access the table. However, SYSMST2 doesn't unlock until the user leaves the main repeat lock in MAIN.P.
How can we scope OE-01A.p so that SYSMST2 unlocks properly? I've tried using RELEASE SYSMST2 and FIND CURRENT SYSMST2 NO-LOCK NO-ERROR at the end of OE-01A.P, but neither works.
EDIT: I can't add my code to my post for some reason. I keep getting an "Oops! We ran into some problems" message.
Last edited: