Cancelling an ADO query with Oracle

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sandra (sandra.tomkinson_at_emagine-int.com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 15:54:50 +1000

Hi All,

I am running a VB.NET application which is using ADO to connect to an Oracle
9i database. I have a form which runs a query which can take a considerable
time to run depending on the criteria that is entered. This query is run on
a seperate thread as I wish to return control to the application while this
query runs. The user can cancel the execution of this query at any time by
hitting a cancel button.

My question is how to terminate this long running query through ADO? - ADO
supports a cancel function however when I run this it takes a long time to
return. I have read in other places that with the cancel - it only starts
to cancel once the first row has been returned to the calling procedure - so
if the procedure takes 20 minutes to run to return the first row then the
cancel can take at least half this time just to cancel.

So how do I cancel ADO queries quickly and cleanly??

Any suggestions will be appreciated as at this stage I am contemplating
using the alter system kill session command in Oracle

Thanks
Sandra



Relevant Pages

  • Re: Cancelling an ADO Command takes too long
    ... not iterate through it until its State property is adStateOpen. ... use Adodataset1.recordset.cancel to cancel Asyncronous execution. ... Those where the server is still crunching away on the query itself rather ... I guess in ADO terms that would be "executing" as ...
    (borland.public.delphi.database.ado)
  • Re: Cancel Fill Operation
    ... I'm not an Oracle expert--but if the OracleClient .NET Data Provider ... If you take this approach you can cancel the async query operation ... Between now and Nov. 6th 2006 you can sign up for a substantial discount. ...
    (microsoft.public.dotnet.framework.adonet)
  • Cancelling an ADO Command takes too long
    ... I have created an application to test asynchronous operations in ADO to ... The problem I have is that the cancel operation doesn't appear to be ... The amount of time that the query I am using ... and reduced the CommandTimeout of both the command and the connection ...
    (borland.public.delphi.database.ado)
  • Re: Oracle and Access
    ... If you're transferring data from an Oracle DB to an Access DB you'll always be affecting the LAN. ... The most efficient way is to use an SQL Pass Through query. ... or if I should use ADO? ...
    (comp.databases.ms-access)
  • Cancel query in 10g
    ... We are using forms 10g and would like to be able to cancel a query. ... Just setting the module to non-blocking, pops up the Oracle Cancel ... Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production ...
    (comp.databases.oracle.tools)