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 |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2006-12-04 : 07:15:40
|
| how to lock a particular column in a databaseunit idno token name30 rab1 a032 test30 rab2 a033 kkk31 rab3 b031 mmmstatatement:i want to lock the unit 30 while iam accessing the records from other seeing.after seeing the unit(30) i want to release the lock.how to do this |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-12-04 : 07:17:43
|
| I would do this by haveing another table - add the entry to that table to indicate the row is locked.All SPs that access the table use that locking table to see if the row is locked.You can also do it with a flag on the table.You will need to hold something to check that the connection hasn't been lost - I usually use the spid and logon time.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|