Cancelling long query?

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

Sometimes I need to cancel a query that is taking a long time to run. The
resaon for the cancelation is soimply impatienace, its not that it has gone
wrong.

Control-Break just brings up a dialogue box for caneling any code that is
running but I can't cancel the 'whole' query.

Is there a way?

Regards.
Bill
 
Bill said:
Hi,

Sometimes I need to cancel a query that is taking a long time to run. The
resaon for the cancelation is soimply impatienace, its not that it has gone
wrong.

Control-Break just brings up a dialogue box for caneling any code that is
running but I can't cancel the 'whole' query.

Is there a way?

Regards.
Bill
If I'm not mistaken Esc will work.
 
Bill said:
Sometimes I need to cancel a query that is taking a long time to run. The
resaon for the cancelation is soimply impatienace, its not that it has gone
wrong.

Control-Break just brings up a dialogue box for caneling any code that is
running but I can't cancel the 'whole' query.

This implies you are executing the query in code. You can use an ADO
Connection or Recordset object to execute asynchronously i.e. control
immeditely returns to the calling program and a 'callback' event fires
when the execution/fetch is complete. Of course, you can cancel the
query while waiting for the 'callback' event. See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthadocancel.asp

http://support.microsoft.com/default.aspx?scid=kb;en-us;190988
 
Bill said:
Hi,
[quoted text clipped - 11 lines]
Bill
If I'm not mistaken Esc will work.

Fraid you are mistaken!!
Excuse me. If you had provided ALL the information, like you were running
the query from code, I would not have provoded my answer. Ctrl+Break also
work to stop a query. I'll have to remember to leave you alone from now on
if you are going to take pot shots (as indicated by your double exclamation)
when someone tries to help.
Sink or swim on your own!!
I apologize to the rest on the board for my tirade but I think Bill needs to
be appreciative and not dismissive when someone tries to help him.
 
Back
Top