What is the best way to combine data retrieved from a remote source and calculated info in the same table?
For example, in the protocol definition I have 3 columns are retrieved from an external source (via WMI or via SNMP) : this data is filled in immediately in the table.
Due to this, the existing calculated values are cleared.
Logic in a QAction will calculate and set data in 2 other columns of that table.
When an alarm in configured on these calculated values the root time will be reset every time the data is filled in.
1. How can I avoid the clearing of the calculated data and thus have a root time that is really the root time and not the last updated time?
2. Or do I always need to make a hidden buffer table and copy all the retrieved data into a fully customized table (will extra logic and system load needed to keep the 2 tables in sync)?
3. Do you have any practical coding example how to best integrate this need?
Hi Mieke,
Personally I would go for option 2. You hide the table containing the data from the external source, make it volatile so that no entries are stored to the DB and copy all the data to a custom table. It will take a bit more resources, which is negligible in my opinion because it only uses RAM and you need to read out some columns anyway to make the calculations or at least store them.