Solved

Stoping a query in the middle...

Posted on 2001-07-27
6
200 Views
Last Modified: 2010-04-06
Hello!
I am writing a database program using ADO and I want
to have a stop button that will be able to stop a query in the middle (If it is taking too long, and the user decide to cancel the query...).
Everything I tried so far faild, and I have no more ideas.
Does anyone knows how can it be done???
10X a lot,
Inbal.
0
Comment
Question by:iofek
6 Comments
 

Expert Comment

by:syloux
ID: 6328077
listening...
0
 
LVL 6

Expert Comment

by:edey
ID: 6328117
I don't do any DB stuff, but this article looked promising: http://groups.google.com/groups?hl=en&safe=off&th=46963f664d27dde0,2&seekm=3b38f20e_1%40dnews#p

GL
Mike
0
 
LVL 1

Expert Comment

by:bnemmers
ID: 6328274
Make sure you set the ExecuteOptions of the ADOQuery to
include eoAsyncFetch. If you don't you will not get the event OnFetchProgress.

Bill.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Accepted Solution

by:
FrodoBeggins earned 50 total points
ID: 6329456
There is a brute force method. Run the query in a thread and kill the thread whenever you want. In fact, you need to run it in a thread anyway, or the STOP button will not react.
But I hope there is a better way
0
 
LVL 6

Expert Comment

by:wimmeyvaert
ID: 6342158
Listening ...
0
 

Author Comment

by:iofek
ID: 6381410
well, I hoped there will be a better way but it seems like
there isn't so thanks anyway. I guess it still gonna work...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now