JnlLineDim.LOCKTABLE(TRUE, FALSE); Raises an Error

Toddy_BoyToddy_Boy Member Posts: 231
Hi Guys

Can anyone explain why this code would raise the locked by another user error in the form of a message box with an OK button as opposed to the standard message box which informs of the lock then closes automatically when the lock is released (as happens previously in the executed code)? ](*,)

Client 3.70.B DB 2.01.B Native
Life is for enjoying ... if you find yourself frowning you're doing something wrong

Comments

  • krikikriki Member, Moderator Posts: 9,110
    1) are you sure it is a LOCKTABLE(TRUE,...) and not a LOCKTABLE(FALSE,...)?
    2) if not 1) then, are you sure there is no LOCKTABLE(TRUE,...) before current one in the same transaction? (I am not completely sure that the first LOCKTABLE will be kept or if the second will be used)

    In these cases it is normal behaviour.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Toddy_BoyToddy_Boy Member Posts: 231
    Hi Kriki

    Thanks for the quick reply, I am definitely sure it's LOCKTABLE(TRUE, the puzzling thing is the error message with the OK button and not a message that's shown and disappears?

    I don't think this table is locked previously within this transaction however other tables are locked.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • krikikriki Member, Moderator Posts: 9,110
    The fact that it is an error lets me think it is a LOCKTABLE(FALSE,...) because this means that if the table is locked, don't wait but generate an error.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Toddy_BoyToddy_Boy Member Posts: 231
    It's definitely LOCKTABLE(TRUE, FALSE) however the routine that locks the table is called a number of times. Could this be causing the error box to appear?
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • krikikriki Member, Moderator Posts: 9,110
    I think so yes. Probably it is already in a transaction when the routine is called.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.