Subject Re: firebird events question
Author russellbelding
I think I understand your idea. For each connection to the DB file I
assign an application a SESSION_ID. Each client application knows its
SESSION_ID. Each table of interest to me should have a SESSION_ID
column. Each change to the DB changes the session ID_column to the
SESSION _ID of the client making the change.

Each trigger I use issues two POST_EVENTs
POST_EVENT cast(new.SESSION_ID as varchar(16))

Each form registers to listen for EVENT_NAME and SESSION_ID.asString.

As I only want to act on events I did not cause, whenever I get a
SESSION_ID event along with the 'EVENT_NAME' event, I ignore
the 'EVENT_NAME' event.

This would work for me after I addedd a new column to each table.



--- In, "Photios Loupis (4T)"
<loupisp@a...> wrote:
> I have a similar situation that I have found a way around.
> For every record INSERTED into my db I used the triggers to
> the message to a client and client application. I have listeners
> that process records based on the ApplicationId assignedto the
> based on certain rules. The event that is raised uses the
> ApplicationId as the event name in the AFTER_INSERT trigger, ie
> POST_EVENT NEW."ApplicationId";
> The listeners configuration contains which ApplicationIds they
> process and so when they are loaded they modify the TIBEvents
> component and register the event(s). Upon receiving the event the
> query the db for records and process them...etc etc
> Hope this helps
> --- In, "russellbelding"
> <russell@b...> wrote:
> > I am using After-Insert, After-Update and After-Delete triggers
> > in them POST_EVENT lines to signal that a table has changed to
> > listeners. So my statements are like
> > TO receive these events clients register as a listener
> > for 'EVENT_NAME'.
> >
> > If I am the client who made the event happen I do not want to act
> on
> > the event. If another client made the event happen I want to take
> an
> > action.
> >
> > If listeners could register to be notified for
events 'EVENT_NAME*'
> > they could get notification of events named
> > 'EVENT_NAME001', 'EVENT_NAME002' and so on. But Firebird does not
> yet
> > permit having wildcards in listener registration (does it?).
> >
> > Is there any reliable way for me to not act on an event I have
> > caused?
> >
> > Thanks for any suggesions.
> >
> > Russell Belding