Subject RE: [firebird-support] Send event to client after row edit ?
Author Thomas Steinmaurer
Hi there,

> Even if you're using FIBPlus you can use the DMLCache mechanism that
> IBObjects uses: get this techinfo
> (http://www.ibobjects.com/docs/ti_dmlcaching.ZIP) and read especially the
> chapter "Implementing the Additions to the Database".
> The idea is to create one table named "DMLCache" in your db that will hold
> all DML operations you want to get notified of, it contains records like
> these (I = Insert, U = Update, D = Delete):
>
> ID_DML | KeyField | KeyValue | Action
> ---------------------------------------------------------------
> 1 | ID_Customer | 9 | 'I'
> 2 | ID_Customer | 5 | 'D'
> 3 | ID_Customer | 9 | 'U'
>
> These records get inserted by triggers in your other tables, i.e. the
> "Customer" table.
>
> An after-insert trigger for table DMLCache will post a single event named
> i.e. "DMLCache_Ev".
> In your client app you register the event and remember the last read ID_DML
> value. Then when the event is fired you just get the latest records from
> the DMLCache table and process them as necessary. These records will tell
> you exactly what has been changed.

<shameless_advert> ;-)
And if you are geting bored adding the log triggers on the tables
manually, then have a look at the DML Caching integrator support
of IB LogManager.
http://www.upscene.com/products/audit/iblm_ibo_dml_caching_main.htm
and
http://www.upscene.com/products/audit/iblm_ibo_dml_caching_integrator.htm
</shameless_advert> ;-)



Best Regards,
Thomas Steinmaurer
LogManager Serie - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com