Subject | Re: firebird events question |
---|---|
Author | Photios Loupis (4T) |
Post date | 2004-09-17T13:34:12Z |
I have not needed to CAST the INTEGER field for the EVENT. I have
used it as is. By the way I am using Delphi 7 with the TIBEvents
component.
I believe that you could get away with using only 1 event rather than
2, but I say this not fully understanding the functionality you need.
--- In firebird-support@yahoogroups.com, "russellbelding"
<russell@b...> wrote:
used it as is. By the way I am using Delphi 7 with the TIBEvents
component.
I believe that you could get away with using only 1 event rather than
2, but I say this not fully understanding the functionality you need.
--- In firebird-support@yahoogroups.com, "russellbelding"
<russell@b...> wrote:
> I think I understand your idea. For each connection to the DB fileI
> assign an application a SESSION_ID. Each client application knowsits
> SESSION_ID. Each table of interest to me should have a SESSION_IDSESSION_ID.asString.
> 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))
> POST_EVENT 'EVENT_NAME'
>
> Each form registers to listen for EVENT_NAME and
>the
> 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.
>
> Thanks
>
> Russell
>
> --- In firebird-support@yahoogroups.com, "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
> associate
> > the message to a client and client application. I have listeners
> > that process records based on the ApplicationId assignedto the
> record
> > 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
> > query the db for records and process them...etc etcact
> >
> > Hope this helps
> >
> > --- In firebird-support@yahoogroups.com, "russellbelding"
> > <russell@b...> wrote:
> > > I am using After-Insert, After-Update and After-Delete triggers
> and
> > > in them POST_EVENT lines to signal that a table has changed to
> > > listeners. So my statements are like
> > > POST_EVENT 'EVENT_NAME'
> > > 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
> > ontake
> > > the event. If another client made the event happen I want to
> > annot
> > > 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
> > 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