robert wrote:
Peter Arrenbrecht <ar*********@NOXXX.opus.ch> wrote in message
news:<41********@news.cybercity.ch>... We have a setup with a v7 client accessing a v8 UDB server running on
AIX. When I call SQLCancel from a second thread on a long running query,
SQLCancel itself simply waits for statement completion too. That was not
the idea, no? Does anyone know how to fix this? Or is it not supported
(despite being described in the DB2 help)?
Regards
Peter Arrenbrecht
Opus Software AG
my preferred editor, Advanced Query Tool, stopped supporting asynchronous
queries in V8. they said it was because V8 stopped supporting it. so,
empirically, it worked. now it doesn't.
SQLCancel and asynchronous execution are two completely different beasts.
SQLCancel: One thread executes a long running SQL statement, and it is
blocked waiting for the database server to return the control to the
calling thread. SQLCancel can now be used from another thread to flow the
interrupt information to the database server. The server will then take
the necessary actions to terminate the query at a convenient time.
Async: Asynchronous execution differs because you don't need two threads.
An async statement execution causes the control to return immediately to
the caller. Of course, the statement might not have finished, so the
caller has to check once in a while to test if the execution is done now.
You don't need multiple threads here.
Asynchronous execution is indeed not documented any longer (but it should
still work for backward-compatibility only, I believe) because you can do
the same thing using multiple threads.
--
Knut Stolze
Information Integration
IBM Germany / University of Jena