Abort long-running fetch

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
heidenbluth
Posts: 56
Joined: Mon 08 Nov 2004 19:01
Location: Germany

Abort long-running fetch

Post by heidenbluth » Thu 29 Nov 2007 08:25

There is a TOraQuery.BreakExec procedure that allows me to abort query execution while it is running on the server. Sometimes, I rather wish to cancel fetching. Lets consider a query that executes fast and displays in an instant the first rows in a data grid. Now the user presses the "Last" button, and the application starts fetching a whole bunch of rows. After waiting a couple of minutes, he would wish to cancel fetching rather then killing the entire application. Is there a way, maybe some sample code, how this can be done?

I would like to display a modal dialog in another thread with a cancel button as soon as fetching runs longer than say 3 seconds. It is essential that it works event-driven, i.e. if the user presses "Last" it should come up. The button should allow to cancel fetching. As soon as the fetching has completed the dialog should hide automatically. I have done a similar thing for executing.

Any suggestions are welcome. Maybe it is a good idea for a future ODAC enhancement.

Regards,
Holger

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 29 Nov 2007 09:14

In the current ODAC version BreakExec method also stops fetching.

Post Reply