P
P
prog3232014-04-20 11:57:13
C++ / C#
prog323, 2014-04-20 11:57:13

How to update c#/mssql?

for one field "test" in c# do

UPDATE T SET f1 = 1, f2 = 1, f3 = 1, f4 = 1 WHERE s='test';

I get transaction blocking
how to do update correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dobriykot, 2014-08-21
@dobriykot

The request is correct. If it crashes on a lock, then the same operation is taking place somewhere else, or the table/row was locked earlier. Perhaps you are running code in parallel and the threads are interfering with each other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question