
Lock data tables or DQL
good Night
I'm using DataEase 7.2 and Opportunistic setup I have, I'm running a DQL procedure and I need to block a table while a data update and then unlocking to continue with the procedure and another user do the same.
The code is as follows
lock File DOCUMENTOS exclusive .
Global factura := Any DOCUMENTOS with (ID = "TRS" ) CONSECUTIVO .
message factura Window .
modify records in DOCUMENTOS
with (ID = "TRS" )
CONSECUTIVO := CONSECUTIVO + 1 .
unlock File DOCUMENTOS .
But when running it is not doing the job expected two users are entering the same code which is doing the blocking, if I can help I thank you