Abort Query

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Kevin

Abort Query

Post by Kevin » Wed 02 Feb 2005 01:24

Hi,

Is there a way in ODAC to abort a Query? I used to use DOA and you could kill a query at the DB Component level. Is there a similar way in ODAC (and SDAC) to do this?

Thanks,

Kevin

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 02 Feb 2005 08:46

You can use BreakExec method to break execution of the SQL statement.

Kevin

Abort Query

Post by Kevin » Wed 02 Feb 2005 19:22

So, if the user selects a big query over a slow line, and the slow retrieval of records starts, can you still call BreakExec?

In testing, I have been receiving access violations and occassional 12612 errors.

Thanks.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 03 Feb 2005 09:34

You must know that BreakExec functionality is not supported with Net option, pls. see Net option limitations in "Working with ODAC Net" topic of ODAC help.

Guest

Post by Guest » Thu 03 Feb 2005 14:57

I was using OCI, not NET option.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 03 Feb 2005 15:45

Pls. specify your ODAC, Oracle and IDE versions.
Try to reproduce your problem with one of the supplied ODAC demo projects, for example - Query demo. You also must keep in mind that BreakExect should be combined with NonBlockin mode, otherwise the main process would be blocked for execution time, and you will not be able to interrupt query execution.
In case of problem stays pls. send us small demo project that demonstrates your problem and include scripts to create server objects.

Guest

Post by Guest » Thu 03 Feb 2005 15:54

Delphi 6, sp2, OCI, non-blocking mode, using your Multi Demo.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 04 Feb 2005 08:34

Sorry, but we couldn't reproduce your problem, may be we are using BreakExec in different way than you, because there is no any BreakExec functionality in supplied MultiQuery or MultiCursors demo projects. Pls. specify your ODAC and Oracle client/server versions, OS version and send us small demo project with scripts to create server objects to ODAC support address.

upscene

Post by upscene » Wed 09 Mar 2005 12:47

Why isn't the BreakExec method supported for the NET option?

'Cause that's what I'm using ... :?
--
Martijn Tonies
Upscene Productions

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 11 Mar 2005 12:04

Now we do not support BreakExec with Net option. We are planning to add its support in the future.

upscene

Post by upscene » Fri 11 Mar 2005 15:14

We are planning to add its support in the future
Sure hope you can add it for the next release.

I assume this would explain the weird errors I've been getting when using Break with the NET option.

One other quick question with regard to cancelling statements --

You stated that you need to execute the query in NonBlocking mode. Would it also be possible to execute it in "simple" standard mode, but in a different thread (not the application mainthread) so you're handling the threading yourself?

Thanks.

--
Martijn Tonies
Upscene Productions

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 11 Mar 2005 15:26

You can execute BreakExec in standard mode in a different thread.

Post Reply