470,856 Members | 2,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,856 developers. It's quick & easy.

how to aancel a running database query


I have a problem, how to cancel a running oracle-query. The situation:
The user can type in a form, which kind of information he wants to now
e.g. articletext like 'abc%'. This information is transformed to a
query and the oraclecommand open is and the oraclereader execute it.
That works fine. But when the oraclereader tries to read the first
record, it takes a long time. This is normal, a like predicates
instructs the orcleoptimizer to take a full table scan. I want to popup
a small form with a cancel-Button , on which the user can cancel the
long running query. The idea is, to start a thread, in which the first
read is done. At the same time, I open a second thread with the small
form. The mainthread waits for the completition of the first thread.
After this, it aborts the second one (with the small form). This works
fine. When I run another query and hit the cancel-button on the small
form, it aborts the first thread. Ok, that's what I want, but the
thread dies *after* the first record is read, and that takes the most
time. How can I cancel the thread, which is inside the
oraclereader.Read() method ?

Tanks in advance

Dec 7 '06 #1
0 989

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Christopher Brandsdal | last post: by
4 posts views Thread by Kory | last post: by
reply views Thread by peter palus | last post: by
3 posts views Thread by Phil Stanton | last post: by
3 posts views Thread by mnjkahn via AccessMonster.com | last post: by
6 posts views Thread by Phil Stanton | last post: by
2 posts views Thread by existential.philosophy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.