Abort long running asynchronous queries

From: Pasquale <gagliapas_at_hotmail.com>
Date: 13 Aug 2004 11:25:38 -0700
Message-ID: <9e48b402.0408131025.2bce303d_at_posting.google.com>



Hi

I am experimenting with running queries asynchronously (getting data from several tables) and loading the results into a grid.

The .Net Framework version is 1.0.
The remote Database is Oracle9i and the Data Provider is the MS.Net Framework Data Provider for Oracle.

I have a global timeout to execute all queries returning results (partial or complete) to the client: after this timeout or after that all the queries have finished, I do the following actions:

1) abort the still running threads (collected in a arraylist);
2) cancel all the still running commands (collected in a arraylist);
3) close the still opened connection (collected in a arraylist);
4) return a global dataset containing all the tables (partially or
completely filled) to the client.

But upon occurring the timeout I have the following problems: 1) If I activate the ConnectionPooling every 'connection.close' request is correctly performed and the code goes forward allowing me to return partial results. After a while (I guess after that the query has finished to get data) a ThreadAbort exception occurs. During this time the query is still running on the Db consuming resources in vain.

2) If I do not activate the ConnectionPooling every 'connection.close' request stops the code execution (the debugger stays on the request) preventing me to return partial results until for each thread a ThreadAbort exception occurs (I guess after that the query has finished to get data). During this time the query is still running on the Db consuming resources in vain.

Any help? Received on Fri Aug 13 2004 - 20:25:38 CEST

Original text of this message