September 10, 2008 at 10:48 pm
Hi All,
I have a issue related to Stored Proc execution. in more..I have a main stored procedure which is performing some Insert, Update and delete operation on multiple correlated tables and even its calling some inner procedure too and the same stored proc is calling from web application.
I found a new type of issue when i am trying to executing the stored procedure. when i am trying to execute from the Database side by using Unit test script its working fine and the same sp executing when i am calling from webpage. if the end user press the save button once its working fine and executing but if the user wrongly press 2 times its going for deadlock condition and i have to kill the dead lock manually form the backend.
here If i am not wrong, can anybody suggest me how to kill the process or deadlock on the sql script that means can i try below method.
before executing the stored procedure i can check if any lock exists in the Sp then 1st i should kill that then i can run the procedure.
I am not getting the Idea how to handle this situation for this issue.
can anybody suggest me for this?
Cheers!
Sandy.
--
September 11, 2008 at 12:07 am
It may be of some assitance to stop the user on the web page from submitting the form twice.
function pleaseWait( btnsubmit, btnwait )
{
document.body.style.cursor = "wait";
var btn = document.getElementById(btnsubmit);
btn.style.display="none";
var btn = document.getElementById(btnwait);
btn.style.display="inline";
}
Usage:
input type="submit" name="BTN_ADJUST" id="BTN_ADJUST" value="Adjust" onclick=" pleaseWait('BTN_ADJUST', 'BTN_ADJUST_hidden');"
input type="button" name="BTN_ADJUST" id="BTN_ADJUST_hidden" value="Please Wait.." disabled style="display:none "
September 11, 2008 at 12:48 am
There actually is no point handling this issue at the database level, push some checks on the UI to stop users sending the same form again.
September 11, 2008 at 1:03 am
But If by mistake click twice even some validation for disable the button database going to halt condition. how to come over this situation.
Cheers!
Sandy.
--
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply