Re: Question on OCIBreak to stop Query

From: Tomislav <shaka_at_envox.hr>
Date: Tue, 29 Jan 2002 16:51:40 +0100
Message-ID: <MRLN4856106CCA_at_merlin.envox.hr>


Just a thought, but are you sure you are using the same Service Context in both OCIExecute and OCIBreak calls? Because OCIBreak will break only statements that are in the same Service Context as specified by the input parameter.

--
--

/Tomislav.

"Timothy Bish" <tabish_at_twcny.rr.com> wrote in message news:1710e62d.0201281025.2348367c_at_posting.google.com... Hello

    I am trying to write a C++ class that wraps OCI, and uses the DBMS_ALERT package to wait on an event trigger from the DB Server when a change to a specific table takes place. I have everything working except for canceling the OCIExecute once I decide to stop waiting for the event.

    The class creates a separate thread that connects to the DB on it own Context, and Session and it waits using a call to OCIExecute which is executing the following type of SQL

BEGIN DBMS_ALERT.WAITONE(:Event, :Data, :Status, :TimeOut); END;

    I have provided a method for the main thread to call to cancel the OCIExecute() using OCIBreak() which I thought should break the currently running query. However when I call this nothing happens. Does anybody know what I might try to get this working?

I'm running with NT4 sp6, connecting to an Oracle 8.1.7 DB. Compiling with VC++ 6.0 sp5.



Timothy A. Bish
Lockheed Martin - NE&SS
Work Email - timothy.a.bish(at)lmco.com
Received on Tue Jan 29 2002 - 16:51:40 CET

Original text of this message