Hi,
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
Peter