How to check if table is locked or not.

rahul_jnkrahul_jnk BahrainMember Posts: 61
Dear All,

Is there a way to find whether a table is locked before doing any update operation on it?

For eg before I go on updating the records in the Table MyREC, I would like to know before hand whether the table is locked or not

IF MyREC.FINDSET(TRUE, FALSE) THEN REPEAT
......
UNTIL MyREC.NEXT = 0

Thanks.

Answers

  • JJMcJJMc Member Posts: 16
    Try to lock it yourself, if you get an error, then you can't. If you lock the table in a try function, you can catch the error to avoid to stop the process
  • rahul_jnkrahul_jnk BahrainMember Posts: 61
    Thank You @JJMc
    That was what I did eventually. But I thought there could be a better way.
Sign In or Register to comment.