Re: Question on OCIBreak to stop Query

From: Per Forsgren <forsgren_at_home.sol.se>
Date: 4 Feb 2002 21:35:26 +0100
Message-ID: <3c5ef08e_at_news.wineasy.se>


Another approach is to set up a timer that repatedly call WAITONE or WAITANY with immediate timeout..
For each call, check the status parameter to see if the SIGNAL has been fired by your trigger, or not.
In that case you might not need OCIBreak(). Just a thought....it may be easier for you to deal with the problem this way.

/Per

"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 Mon Feb 04 2002 - 21:35:26 CET

Original text of this message