Canceling a Query
| From: | Brinkman, Theodore | Date: | Wed, 16 May 2001 15:45:25 +0000 |
| Subject: | Canceling a Query | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7618@lists.php.net to get a copy of this message | ||
I'm working on an application for work where users will be querying the
database to get information back about processed documents. I'm trying to
set up a way for a user to cancel a query which is taking too long. I'm
using MS SQL Server 2000. The interface for the cancel is easy enough, a
form containing a button that says 'cancel' and a value or set of values
identifying the query being run.
I've found 'KILL <SPID>', but the problem is that all the connections to the
database are done through the web-server so they get the same SPID, which
means that EVERY query being run by EVERY user gets killed. (Obviously not
an acceptable solution.) Does anybody out there know of a way to
specifically kill a single query/stored procedure? We're willing to track
as many values as necessary to do it.
Thanks.
- Theo