1
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.