1
Answer

Concurrent request

Habeeb

Habeeb

6y
681
1
Hi,
 
i am working on ASP.NET application (ADO.NET as data layer). Back end we are using oracle. The idea is when the user clicks on save button then in the oracle DB, we are generating the Document No. (max+1 of a DocNo column).
 
imagine, if 100 users click save button at same time, will it give same document no. to all 100 users? or is it like IIS handles one request at a time?
Answers (1)
1
Rupesh Kahane

Rupesh Kahane

101 19.1k 4.2m 6y

hello,

I have a question

1) Does your  Document No column have Primary key with Is Identity or something like that?
2) While inserting are you getting the Max number from database and then Max + 1, Are you doing the same?
 
Please try to use transactions in C#. So every time transaction will be begin & complete the same, so next transaction will begins after that. 
 
Let me know if any concer.