I have an application that queries SQL Server and Index Server using ADO.
I'd like to have a feature where a user can cancel a long-running query.
What I plan on doing is to move my query code to a worker thread which will
then post a message back to the main thread when it's done. Then, the
application can have a button that a user can press to terminate the worker
thread. That way, the app stays responsive during a long-running query. Is
there an easier way to do this that anyone would suggest?
Assuming that that's the way I go - can anyone tell me if the framework will
clean up properly if I terminate a thread in the middle of executing an ADO
query? I'm wondering if this could cause any leaks.
- Dave