Subject Re: [firebird-support] POST_EVENT and it params
Author Martijn Tonies
> > > So you have these alternatives:
> > >
> > > POST_EVENT 'AccountAdded' ;
> > >
> > > or
> > >
> > > POST_EVENT NEW."AccID" ;
> > > (Note: double quotes used only if you defined "AccID" in the database
> > > using double quotes)
> > >
> > > or
> > > declare variable StringVar varchar(40);
> > > ...
> > > StringVar = 'New account added: ' || cast (new."AccID" as char(10)) ;
> > > POST_EVENT StringVar;
> >
> >How do you register for such an event?
> >(also for the NEW.ACCID event?)
>
> I have NO idea - but it would be useful to find out. Because I implement
> events with an event alerter (TIB_Events), I always use the event_name
> method and my own handlers. TIB_Events assumes you know the name of the
> event you are listening for.
>
> I don't know what the IBX event-thingie (TIBEvents) does, though. Even
the
> IB 7 docs don't have anything about using the alternatives.

Nope - cannot find anything either.

I guess this is why wild-card events - as proposed for Firebird - would be
nice:

POST_EVENT 'account.added.' || new.accid;

And listening for:

account.added.*

Etc...

Anyway, I posted the question to interbase.general as well.


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com