vijithamar
Programmer
HI
please help me to change sql server locking option to TABLE LOCK to PAGE/ROW LOCK
I AM USING .NET + SQL SEVER 2005 EXPRESS
I tried like this :-
my problem is, entier table 'Batch' get locked for updation until the commit statement. other computers has to wait until the For-Loop gets over
i tried 'WITH (ROWLOCK)' option in update statement but no effect.
Thank you
Viju
please help me
please help me to change sql server locking option to TABLE LOCK to PAGE/ROW LOCK
I AM USING .NET + SQL SEVER 2005 EXPRESS
I tried like this :-
Code:
cmd.Connection = Conn
trn= Conn.BeginTransaction()
cmd.Transaction = trn
For i=1 to NumOfProd
cmd.CommandText = "Update batch set stock=" & vqty & " where batchid=" & vid
cmd.ExecuteNonQuery()
Next i
trn.commit
i tried 'WITH (ROWLOCK)' option in update statement but no effect.
Thank you
Viju
please help me