Print Thread
Canceling a running query
#529 05/15/00 06:08 PM
Joined: Oct 1999
Posts: 10
Rotterdam, ZH, Netherlands
J
Member
OP Offline
Member
J
Joined: Oct 1999
Posts: 10
Rotterdam, ZH, Netherlands
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


JohaViss
Re: Canceling a running query
#530 05/16/00 12:35 PM
Joined: Sep 1999
Posts: 27
Germany
K
Member
Offline
Member
K
Joined: Sep 1999
Posts: 27
Germany
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


Oliver Kaesmann
Re: Canceling a running query
#531 05/18/00 08:05 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.025s Queries: 13 (0.007s) Memory: 2.5045 MB (Peak: 3.0431 MB) Data Comp: Off Server Time: 2024-05-19 17:33:52 UTC
Valid HTML 5 and Valid CSS