Canceling a running query

Johan Visser

Member²
How can I cancel a running query?

The manual tells me to use BreakExecution, but it also says that that procedure must be used in a multi-threaded application.

My application is NOT multi-threaded. Is there still a way to cancel my query???

------------------
JohaViss
 
Your application have to be multi-threaded, becauce the thread, that executes the query is blocked while the query is running. So you do need an other, non blocked, thread who cancels the execution of the query.

Oliver
 
The easiest way to accomplish this, is to use a TOracleQuery instance and to set its Threaded property to True. If you subsequently execute it, it will run in a background thread. It can be cancelled by calling TOracleQuery.BreakThread.

------------------
Marco Kalter
Allround Automations
 
Back
Top