Subject Re: [firebird-support] Is possible POST_EVENT with arguments ?
Author Helen Borrie
At 11:01 PM 7/10/2005 +0000, Roberto Novakosky, Delphi Developer wrote:
>Hi all
>
>I need to capture events with IDs from Firebird. So as solution, I
>built a new table XXX on my database, and a trigger with
>POST_EVENT 'MyEvent' + INSERT INTO XXX (My necessary arguments).
>So, from my Application, I receive MyEvent, but I need to see the
>auxiliar table XXX to capture de IDs. I would like to receive the event
>with arguments, MyEvent with one value, is possible ?

No. Events are like a signaling mechanism. The tell a listening app that
something happened, but they are not a transport for data.


>Other solution that I found, was to build a
>POST_EVENT 'MyEvent'||'MyValue', doing a concat of strings, but by this
>way there are more dificult to capture the events on my app.

The biggest problem with this is that event names are restricted to 15 bytes.


>If someone with other Idea ....

There are ways to combine events and triggers so that you maintain a cache
of completed events with information about them (keys, operations) in a
database table. In your app, you will also need a mechanism on the client
side for keeping your clients informed about changes in this table.

If you are interested in the concept, pick up the tech info sheet on DML
Caching from http://www.ibobjects.com/TechInfo.html
If you are using IBO, the whole thing is already in place in the
components; but you can roll your own if you are using some other way to
access data from your Delphi apps. Carlos Cantu will be describing such a
technique generically in his talk at the Firebird Conference in Prague next
month.

./heLen