> Then if client A issues
> SELECT name,lastname from t with(updlock) where id = ?
>
> This will select one row and lock it for the duration of client A's
> transaction.
Hello ,
But :
myTransaction.BeginTransaction(IsolationLevel.ReadCommited);
myCommand.transaction = myTransaction;
What is ?
My code not lock the row/s affected of Query ?
And what is "updlock" ?
How I find documentation on this method ?
Huk?
David Browne - 07 May 2004 14:30 GMT
> > Then if client A issues
> > SELECT name,lastname from t with(updlock) where id = ?
[quoted text clipped - 13 lines]
>
> And what is "updlock" ?
Use update locks instead of shared locks while reading a table, and hold
locks until the end of the statement or transaction. UPDLOCK has the
advantage of allowing you to read data (without blocking other readers) and
update it later with the assurance that the data has not changed since you
last read it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_con
_7a_1hf7.asp
> How I find documentation on this method ?
SQL Books Online, or MSDN
David