Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: DBMS_ALERT
I use something like:
begin register_fn
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR name[20];
EXEC SQL END DECLARE SECTION;
strcpy(name.arr, "alert_xx");
name.len = strlen(name.arr);
EXEC SQL EXECUTE
begin dbms_alert.register(:name); end;
begin wait_fn
EXEC SQL BEGIN DECLARE SECTION;
int sts; VARCHAR msg[100]; VARCHAR name[20];
sts = 0;
msg.len = 0;
msg.arr[msg.len] = '\0';
strcpy(name.arr, "alert_xx");
name.len = strlen(name.arr);
EXEC SQL EXECUTE
begin dbms_alert.waitany(:name, :msg, :sts, 8640000); end;
And be sure to do a commit after the triggering sql, the alert does not go out until the commit.
Good Luck
Nathan
In article <6lr1dn$p49$1_at_nnrp1.dejanews.com>,
marcdesbordes_at_my-dejanews.com wrote:
>
> Hello All,
>
> I am trying to use DBMS_ALERT with Pro*C.
>
> The SIGNAL is sent from a trigger in the database and the WAITONE is executed
> in the Pro*C program.
>
> I don't catch any Alert when I generate a Signal from the database, what's
> wrong? Is there any particular thing I should do?
>
> Note : I am using Oracle 7.x on a Unix machine.
>
> Thanks for any suggestion,
>
> Marc
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Jun 12 1998 - 00:00:00 CDT
![]() |
![]() |