Click here to Skip to main content
15,900,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a problem i made windows application that run on so many terminal and server placed at one station. When two or more terminal access same data at same time the screen got hang an just crash.

like two terminal generating bill they got bill no at same time an here the problem come.
Posted

Oops! Now, that is probably your fault: but without the database design and relevant code fragments it is difficult to tell exactly what you have done. However, I would be prepared to wager a small amount of money that you are generating your row id's (or similar) yourself and multiuser access is trying to create duplicates...

[edit]"without", Griff, not "with". I need caffeine - OriginalGriff[/edit]
 
Share this answer
 
v2
I suspect you are generating the bill number in the client based on the identity values but you are not storing the record when you get the value. Therefore the next user gets the same value.

You need to do 1 of 2 things:
1 Create and store the record when you get the order number thereby removing it.
OR
2 Only get the order number when all the data is stored. This is by far the recommended method! If you have order lines with the order header then you are going to have to learn about transactions as well!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900