Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi - DB Refresh alternative

I am using Delphi with Firebird DB in a software that display many calculations and according to requirement I need to store and display the total whenever other dependent tables gets updated.

I am currently using the refresh method for several TIBTable components to display the result of these calculations to the user. considering this a multi user app and the fact that refresh make posting slow, is there any alternative to refresh or more optimized way ?

like image 963
zac Avatar asked Aug 14 '26 21:08

zac


1 Answers

For a multi-user application, where clients need to receive notifications, one option is to use Firebird events to send a 'broadcast' message for every data change (SQL INSERT, UPDATE or DELETE).

Clients can 'register' (listen) for a specific message type, and whenever the Firebird server sends a message with this type, they will receive it, and run client application code, which in your case would refresh a user interface object to display the total.

While this can be a sufficient solution in many simple use cases, there are also some restrictions. I recently blogged about this topic here:

  • Firebird Database Events and Message-oriented Middleware

(I am author of middleware libraries for Delphi and Free Pascal)

like image 82
mjn Avatar answered Aug 17 '26 15:08

mjn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!