Skip to main content

issues about rowlock in sql.......



suppose if i am using rowlock in following manner

SELECT OrderID
FROM Orders WITH( holdlock , ROWLOCK)
WHERE OrderID =100

then can u please tell me ..... untill how much it will hold this lock . because as soon as i execute this query ; simultaneously i can select the same query from another page. that means it is not holding a lock ...


SO PLEASE ME HELP OUT.......
PLEASE REPLY ME AS SOON AS POSSIBLE
THANKS IN ADVANCE

Comments

  1. it will hold the lock till u commit the transaction & here u havent started any transaction

    Begin transaction !!!
    -Regards

    ReplyDelete
  2. chirag I hav done that but it doesn't allows other user on lan to select other row from the same row...................
    but i got da solution which UPDLOCK with Row lock ...............
    thanks chirag...........

    ReplyDelete

Post a Comment