Worrow Posted August 3, 2007 Posted August 3, 2007 So I started a new thread in my C# application to run a stored procedure. Since it takes a long time to run, I want to let the user cancel this operation while the stored procedure is still running. My question is if I stop this thread, will the stored procedure (which run on a Sql2005 server) stop about the same time, or keep on going? In my case, I would like to stop that as well. Any suggestion? Thanks in advance. Quote
Worrow Posted August 4, 2007 Author Posted August 4, 2007 Just found out there is a function under Sqlcommand called 'cancel'... Now I have another question. If I called trans.Commit right after sqlcmd.cancel, would this actually update whatever the stored procedure has done before the cancel command or doing nothing? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.