To use KILL, the login would have to have pretty high priviliges - probably higher than an application should have when connecting to SQL Server.
The problem here is that the current version of ADO.NET does not support a way to make an async call. I suppose that you could spin up another thread but I'm not sure that stopping the calling thread would cause the managed provider to send the proper Attention signal to SQL Server.
-Mike
>>Is it possible in .Net to accept a Cancel button click while a long running stored procedure is in progress, and to then cleanly stop the SQL Server process or similar?
>>
>>TIA,
>>Simon
>
>Simon,
>
>To stop the SQL Server process, use the KILL T-SQL command. See KILL in the SQL Server help for more details.
>
>Also, is your long-running stored procedure executing a lot of commands, or is it waiting on one massive query?