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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-04-14 : 08:08:03
|
| Jay writes "i have a table with ordernum as one of the columns. it is a identity column. i have 5 users accessing this table at the same time. when they retrieve the top 1 ordernum where one of the fields match a criteria, they all get the same record. how do i lock a record from within a select statement, i have tried "WITH (readpast,xlock)" and WITH (holdlock,rowlock) but it is not working.please help" |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-04-15 : 02:25:49
|
quote: Originally posted by AskSQLTeam Jay writes "i have a table with ordernum as one of the columns. it is a identity column. i have 5 users accessing this table at the same time. when they retrieve the top 1 ordernum where one of the fields match a criteria, they all get the same record. how do i lock a record from within a select statement, i have tried "WITH (readpast,xlock)" and WITH (holdlock,rowlock) but it is not working.please help"
is it safe to ask, why are you trying to lock the record in a select statement?--------------------keeping it simple... |
 |
|
|
|
|
|