• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Stoping a query in the middle...

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
iofek
Asked:
iofek
1 Solution
 
sylouxCommented:
listening...
0
 
edeyCommented:
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
 
bnemmersCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
FrodoBegginsCommented:
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
 
wimmeyvaertCommented:
Listening ...
0
 
iofekAuthor Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now