The Firebird Sql database has a feature that allows the db server to communicate with the clients that have subscribed to the desired events.
It is necessary to create a trigger like:
------------------------------------------
CREATE OR ALTER TRIGGER TR2 FOR PRODUCTS
ACTIVE AFTER UPDATE POSITION 0 AS BEGIN
IF (new.PRICE <> old.PRICE) THEN POST_EVENT 'price_changed';
END
------------------------------------------
Firebird ADO.NET Data Provider. Contribute to cincuranet/FirebirdSql.Data.FirebirdClient development by creating an account on GitHub.
This feature is very useful in applications such as chat or similar where the client part must react quickly to changes that occur in the database
It would be very interesting to have this functionality also for B4X programs, and therefore the question is:
how to 'subscribe' a Firebird Sql event from B4X code?