Start Free Trial
Abort sql query in the middle of the execution process.
I want to abort my sql query in the middle of the execution process,how can i do it?
I 'am using ADO.Net with sql server 2005.
Microsoft SQL Server 2005
8/22/2022 - Mon
You will have to use threads. The execution of an SQL Statement should be done with a thread. This will give you options to execute other code without depending on the thread results. You could then kill this thread and close database connection.
This is not the solution that I look for,there is any other way to do this,I mean stop/abourt query without to force the connection to close.
This might help:
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
I try to be more specific ,My problem is that the sql query execution can take alot of time,and meanwhile the user can decide that he doesn't wants this query resualt, he wants to abort is request, and request for another qeury result.
My request is to know how to do it like sql server managment studio,it's mean to abort the query in the middle,without waitting for the query finished to run(The problem isn't to do this async,the problem that even it will run in backstage it will consume process time).
ASKER CERTIFIED SOLUTION
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent