Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sangamd
Starting Member
2 Posts |
Posted - 2014-05-27 : 06:00:03
|
Have one table :----------------------ID EMPNAME SAL----------------------112 John 15000113 Sid 25000114 Smeeth 18000115 Roy 26000116 Robort 50000Users :UserOne and UserTwoI want to achieve row locking on above table, like if userone accessing row having id 114 during this if usertwo want to select * from table then usertwo can get only rows having no lock (other than row having id 114).is this possible ?if yes then please help me...Thanks Sangam |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-05-27 : 11:43:14
|
It is not possible unless you do some form of custom "locking." |
|
|
sangamd
Starting Member
2 Posts |
Posted - 2014-05-28 : 02:11:21
|
custom "locking."? |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-05-28 : 11:54:10
|
Another term for that is Optimistic Concurrency. Basically, you need some column or columns that are used as a in indicator that the row is being edited. Then you can exclude that row from your query for a different user.Here is an MSDN article about the topic:http://msdn.microsoft.com/en-us/library/aa0416cz.aspx |
|
|
|
|
|