Sql 2000 with dot.net 1.1

How I can give to my user ability to kill or cancel transaction
Immediately, and rollback?

I try to kill the thread. But this not cause the transaction to be
Cancel immediately. First this takes a lot of time. Secondly I not be sure
if
this make rollback.

Re: How I can give to my user ability to kill or cancel transaction by Sahil

Sahil
Mon Dec 06 07:47:56 CST 2004

Hmm .. can you break and rollback a transaction in Query Analyzer after
issuing a "Commit"?

You could look to implement this functionality through transaction logs or
buffer tables that show him what it's gonna look like and ask him once again
"Are you really really really sure this time?" - but well - if the user
isn't sure that he should have commited - then he shouldn't have commited.

This is paradoxical - transactions are provided to avoid the user being
unsure and making mistakes - he gets to see his changes before they get
saved in the d/b - but wrapping the transaction around another transaction
is an overkill.

That's about all I know but there are plenty of very smart people on this
group who might know of another way.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik




"mttc" <s@hotmail.com> wrote in message news:41b40b96@news.012.net.il...
> Sql 2000 with dot.net 1.1
>
> How I can give to my user ability to kill or cancel transaction
> Immediately, and rollback?
>
> I try to kill the thread. But this not cause the transaction to be
> Cancel immediately. First this takes a lot of time. Secondly I not be sure
> if
> this make rollback.
>



Re: How I can give to my user ability to kill or cancel transaction by mttc

mttc
Mon Dec 06 13:32:46 CST 2004

my q is when transaction still in proccess, not after commit!



Re: How I can give to my user ability to kill or cancel transaction by W

W
Mon Dec 06 16:05:11 CST 2004

You can call the Cancel method of the command object and handle the rollback
accordingly. Another nice feature you may want to look into is the Save
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqltransactionclasstopic.asp
method which creates a Savepoint so you can still move forward if you need
to.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"mttc" <s@hotmail.com> wrote in message news:41b4b479@news.012.net.il...
> my q is when transaction still in proccess, not after commit!
>
>