Subject Re: [firebird-support] Subscribing Events
Author Mahesh Ishwar
Thanx Helen for the nice explanation.
One thing I wanted to ask, does all the client applications get notified for a particular insert?
I mean to say for a particular event can n number of clients be notified, taken into account if they are properly registered?
Actually I've a .NET client application and I want to subscribe for any events in a particualar stored procedure. But only the client firing the query gets notified and all the clients are not.
Here is a link which explains the problem more clearly
http://sourceforge.net/mailarchive/forum.php?thread_id=3068159&forum_id=12591

I just wanted to know how does Firebird actually behaves to this situation. Just to compare with this.

Thanx.
Mahesh.
Helen Borrie <helebor@...> wrote:
At 09:05 AM 15/09/2003 +0100, you wrote:
>Hello All,
>I can publish an event by writing POST_EVENT(<event_name>) in a stored
>procedure or in a trigger. Can someone tell me how to become a subscriber
>of this event in another stored procedure?

That's not what events are for: they are for signalling the client.

>What I want is whenever my 'publisher' stored procedure is called, all the
>'subscriber' stored procedures should also be executed.

Why can't your 'publisher' procedure call the 'subscriber' procedures
itself? Alternatively (or in combination with procedure calls) you can
cause triggers to run off any DML calls performed by your procedures.

>In the '60EmbedSql.pdf', they have given some syntax, but it is for
>embedded sql and the syntax(i.e., EVENT INIT, etc.) doesn't even lets to
>compile the stored procedure.

EVENT INIT is a client-side request which signals to the event manager that
the client is listening for the event (or a list of up to 16 events).

Embedded SQL (ESQL) is not procedure language (PSQL). It's a special
subset of SQL that can be preprocessed by the gpre program into native host
language macro calls that are functionally equivalent to the API calls made
in dynamic SQL (DSQL). An ESQL program is a client program - it is not
equivalent to a PSQL module, which executes on the server and is invoked by
an SQL request. In fact, an ESQL program can call stored procedures...

heLen

---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

[Non-text portions of this message have been removed]