ThreadAbortException and SQL?
-
I am using a Thread.Abort to abort an SQL command when the user wants to stop the current execution of an SQL Command. However, it seems to take a while for the ThreadAbortException to start up and cancelling the current execution. So I am wondering what takes place when the Thread.Abort that makes the SQL takes about 10-15 seconds to allow it to go towards the ThreadAbortException. -- modified at 22:56 Thursday 23rd February, 2006
-
I am using a Thread.Abort to abort an SQL command when the user wants to stop the current execution of an SQL Command. However, it seems to take a while for the ThreadAbortException to start up and cancelling the current execution. So I am wondering what takes place when the Thread.Abort that makes the SQL takes about 10-15 seconds to allow it to go towards the ThreadAbortException. -- modified at 22:56 Thursday 23rd February, 2006
ThreadAbort can abort threads only when they are running managed code. When you called the method to abort the command, it probably was executing unmanaged code. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
I am using a Thread.Abort to abort an SQL command when the user wants to stop the current execution of an SQL Command. However, it seems to take a while for the ThreadAbortException to start up and cancelling the current execution. So I am wondering what takes place when the Thread.Abort that makes the SQL takes about 10-15 seconds to allow it to go towards the ThreadAbortException. -- modified at 22:56 Thursday 23rd February, 2006
This is a brutal way to cancel a SQL command. Ever considered trying SqlCommand.Cancel? -------- "I say no to drugs, but they don't listen." - Marilyn Manson
-
This is a brutal way to cancel a SQL command. Ever considered trying SqlCommand.Cancel? -------- "I say no to drugs, but they don't listen." - Marilyn Manson