Isolation Level (locking)

dgdwyerdgdwyer Member Posts: 8
edited 2008-03-20 in SQL General
What is the default isolation level in Navision and how do you control this in the code? I'm using SQLServer 2000. We are seeing records being locked and I'm not sure how to overcome this.

Thanks.

Comments

  • garakgarak Member Posts: 3,263
    if you use
    findset(true);
    

    or
    locktable;
    find('-'); / find('+')
    

    the sql statement is:
    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
    SELECT * FROM YourTable WITH (UPDLOCK) .....
    

    but if you not use locktable, the sql statement looks like
    SELECT * FROM YourTable WITH (READUNCOMMITTED) ....
    
    Do you make it right, it works too!
  • krikikriki Member, Moderator Posts: 9,115
    [Topic moved from Navision forum to SQL General forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • bbrownbbrown Member Posts: 3,268
    Take a look at CURRENTTRANSACTIONTYPE and Transaction Type in the C/Side Reference Guide (Help). The command CURRENTTRANSACTIONTYPE can be used to check and set the current Transaction Type which is related to the SQL isolation level.
    There are no bugs - only undocumented features.
  • DenSterDenSter Member Posts: 8,307
    I'm not sure if you can prevent records from locking though. Certainly using that property does not seem to work as well as you would think.
Sign In or Register to comment.