Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...