Solved

Stoping a query in the middle...

Posted on 2001-07-27
6
199 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Delphi XE7 Rest Client 2 177
automatically logging in via bde delphi 3 54
TVirtualStringTree  search using TEdit 7 81
LAN or WAN ? 11 66
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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