How to Stop the Sql Server Execution Process from C#

Posted by T.saravanan under C# on 7/30/2010 | Views : 3164 | Status : [Member] [MVP] | Replies : 2
Hi,
I design a query analyzer in windows application using C#.User can design a query from a given fields and then click a button, the query goes to sql server after execution result show in datagridview.But my question is if user click a button that query execution take a long time at the same time,how to stop that execution process using another button event.


Advance Thanks,
T.Saravanan

Thanks,
T.Saravanan



Responses

Posted by: Vuyiswamb on: 7/30/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down

What does your Query do ?

You can use Transactions to cancel your query



Thank you for posting at Dotnetfunda
[Administrator]

T.saravanan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 7/30/2010 [Member] [MVP] Silver

Up
0
Down

Actually i design a query analyzer in windows application.User can design a query to select a different fields from different tables.That query goes to execute in sql server after execution that result displayed in datagridview. If that query execution takes more time how to stop that execution from front end(using C# code)at the same time it comes to previous stage.

Thanks,

Thanks,
T.Saravanan

T.saravanan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response