Hello,
Please can someone tell me how to remove a lock on a table?
I placed the lock using "record.locktable" syntax. i would like to know how to remove it within the code.
Thanks
Remove? It will be removed when the transaction ends. If you need to prevent "locking" (when user see the info tat the table is locked", you need to make the transaction as short as possible by optimizing the hardware and the application.
When tables are locked by a transaction, they will remain locked until one of the following situations occurs:
1) The transactions ends (as kine mentioned)
2) A COMMIT occurs
3) An error statement (a rollback) occurs.
A COMMIT during a transaction is a no go - unless you are sure, that you want to start a new transaction.
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
MVP - Business Apps
When tables are locked by a transaction, they will remain locked until one of the following situations occurs:
1) The transactions ends (as kine mentioned)
2) A COMMIT occurs
3) An error statement (a rollback) occurs.
A COMMIT during a transaction is a no go - unless you are sure, that you want to start a new transaction.
My techblog
Meet me @ LinkedIn
So since so many community members have helped you, it might be fair if you explained how you solved the issue, and give something back.
it was removed at the end of the transaction. Thanks