Home > Archive > MS SQL Server > December 2005 > Locking a record.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Locking a record.
William GS

2005-12-13, 7:23 am

Hello, how can I lock a record? it must be modified only for one user at the
same time. Is there a SQL sentence to do this?

Thansk in advance.
William GS
SQL

2005-12-13, 9:23 am

You can use a HOLDLOCK lock hint inside your transaction
or set the Transaction Isolation level to SERIALIZABLE

http://sqlservercode.blogspot.com/

Scott Morris

2005-12-13, 9:23 am

Please do not post the same message to mutiple newsgroups independently.


Med Bouchenafa

2005-12-13, 9:23 am

It's the natural way that SQL Server works
SQL Server internal looking mechanism always prevents than more than one
connection can modify the same data
You don't have to do anything unless you are facing something special.
In this case, please give more information about your problem

--
Med Bouchenafa

"William GS" < WilliamGS@discussion
s.microsoft.com> wrote in message
news:846631AC-2CD9-494C-A84B- 39411C80D9C4@microso
ft.com...
> Hello, how can I lock a record? it must be modified only for one user at
> the
> same time. Is there a SQL sentence to do this?
>
> Thansk in advance.
> William GS



David J. Cartwright

2005-12-13, 9:23 am

news group nazi ? no post for you !

"Scott Morris" <bogus@bogus.com> wrote in message
news:esSG7G$$FHA.3372@TK2MSFTNGP12.phx.gbl...
> Please do not post the same message to mutiple newsgroups independently.
>



William GS

2005-12-13, 9:23 am

Thank you very much for the help.
William GS


> Hello, how can I lock a record? it must be modified only for one user at the
> same time. Is there a SQL sentence to do this?
>
> Thansk in advance.
> William GS

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com