Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using Triggers in Pro* C/C++

Re: Using Triggers in Pro* C/C++

From: Y <dont_at_reply.here>
Date: Thu, 19 Aug 1999 10:50:53 +0100
Message-ID: <37BBD37D.CEB68BF8@reply.here>


It's a while since I did this ... but you could call the dbms_alert package (see Oracle Application Developers Guide) from within Pro*C.

General sequence of events:

  1. fetch list of records from table
  2. use dbms_alert.wait - to wait for a particular signal
    • this will cause your pro-c to hang until it gets that signal.
  3. use an insert trigger on your table to issue an alert to the pro-c prog (dbms_alert.signal)
  4. your pro-c program will resume execution on receipt of the signal.

You will have to specify a name for the alert - so your prog knows which signal to wait for.

This does work - I've done it myself.

udayavar_at_my-deja.com wrote:
>
> Hello,
> Is there a way to use Triggers in Pro* C/C++ ?.
> I have written a application which fetches list
> of records from the specified table using embedded SQL.
> And if that table is updated by some one I want to be notified
> so that I can go and fetch the same table again. That is, I am
> trying to emulate the list session on that table.
> I would realy appriciate if some one gives reference or example
> code for using triggers in embedded SQL.
>
> Thanks a lot
>
> --
> kailas
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Thu Aug 19 1999 - 04:50:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US