Hello,
I would like to lock a specific table during the runtime of a function.
If there is set a flag, this lock should be reset.
I tried 2 ways:
1. Locktable
Loop that check if the parameter ist set
if yes, reset the lock
2. I made a little form and in the onTimer Trigger i write a dummy record
to the table and after that I delete it. So Navision should lock this
table by itself.
To test both ways I tried so write new data to the locked table - and it
worked!?! But why??? I locked that table ... why I can write to it?
It should be permitted.
regards,
redStripe
0
Comments
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
I can write data to the table in the client where the form runs, but also
from an other client I can write to the table.
as long as the parameter = false the the table should be locked.
But I can insert a new row without any problem ... why???
If you are debugging, this buffering does not happen.
So the LOCKTABLE itself does not always lock the table immediately. If you want to do that, you should put a "IF FINDFIRST THEN ;" [or FIND('-') ] after it.
This last piece of code sends the "LOCKTABLE"-request to the DB and the table will be locked.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
changed
Are there maybe other ways to block a table?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!