Easy to Create, Easy to Change - Easy to use!


Lock data tables or DQL


Started by diego fernando Ocampo
Search
You will need to Sign In to be able to add or comment on the forum!

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

Written by diego fernando Ocampo 01/10/13 at 00:04:39 DataEase for Windows 7.x