| |

VerySource

 Forgot password?
 Register
Search
View: 1784|Reply: 16

One exe program runs on multiple clients

[Copy link]

1

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-15 14:20:01
| Show all posts |Read mode
An exe program is running on multiple clients. When you want to modify a table in the same database, how to prevent several people from modifying the same record of the same table at the same time?
Reply

Use magic Report

0

Threads

12

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-19 13:45:01
| Show all posts
Need to use the lock, depending on the situation
Reply

Use magic Report

0

Threads

10

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-20 10:27:01
| Show all posts
In .net, open concurrency is generally used. When data is modified when it is submitted to the data source, the new data is compared with the old data by querying it. There are users who choose which data to save. Specific processing methods are given in <ado.net Technology Insider> or <ado.net Advanced Programming>.
Reply

Use magic Report

1

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-23 16:45:01
| Show all posts
Boss, can you give an example
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-23 19:36:02
| Show all posts
Geese left marks ...
Reply

Use magic Report

1

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-23 23:18:01
| Show all posts
Top yourself
Reply

Use magic Report

1

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-30 11:27:01
| Show all posts
up ????
Reply

Use magic Report

1

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-2-8 03:15:02
| Show all posts
No one speaks ???
Reply

Use magic Report

0

Threads

17

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-2-8 23:15:02
| Show all posts
Different things are handled differently. If you just want to keep the data correct, you can make it multi-threaded. Modify the data
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-24 13:15:01
| Show all posts
update users where username = @ oldUserName and password = @ oldPassword
When performing such an update, if the number of affected rows is 0, the original record has been modified. This is optimistic concurrency.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list