execution of one statement at the same time

May 27 2009 5:44 AM

hi guys,
Please help me out I have  two applivations client side and sever side, the client side call methods from the sever side so the problem comes in when two instances of a client side press one button at the same time meaning the sever method will be excetuted at the very same time(I have a connection to a DB so when they both try to open it bomb out because it can't have one connection opened twice or one transaction will try to open the connection while the other oone is busy using it so it ends up killing My application), so I just need to know how can I block the second transaction from running the statement while the first one is busy with it ?
Thanks   

Answers (1)