How can I monitor specific table from Delphi application (real time) and get new and updated records data ?
In general, you can use database events / notifications / alerts. The exact term and implementation depends on a DBMS. For details you can check "DBMS alert mechanisms" at AnyDAC documentation.
On a backend you may need to implement triggers for required tables. For some DBMS it is not required. For example, with Firebird a trigger has to call POST_EVENT
statement. With SQL Server the special set of Query Update Notification API operators must be called to prepare a table.
On a client you should use either special API, either standard SQL query mechanism. For example, with Firebird the special event API must be used. With Oracle a background thread + standard SQL API.
The Delphi implementation depends on a DBMS and data access components. Some examples:
TIBEvents
with Firebird;If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With