Skip to content

Commit

Permalink
Corrected multiple users locking the same object. Closes #34.
Browse files Browse the repository at this point in the history
The locking is achieved by attempt to insert into the lock table which contains a unique index. It the insert fails then the record is already locked because the insert breaks the database table's key constraint. However, the UserID was incorrectly included in the unique index / key which meant that attempts by multiple users to insert into the table would not fail.
  • Loading branch information
hisystems committed Mar 13, 2012
1 parent c22a005 commit 6493d44
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Database/DatabaseObjectLockController.vb
Expand Up @@ -243,7 +243,6 @@ Public Class DatabaseObjectLockController
objIndex.TableName = pstrLockTableName
objIndex.Fields.Add("TableName")
objIndex.Fields.Add("RecordID")
objIndex.Fields.Add("UserID")

Return objIndex

Expand Down

0 comments on commit 6493d44

Please sign in to comment.