Answer the question
In order to leave comments, you need to log in
How to keep track of adding records to a database using code (C++, QT4)?
There is a database (PostgreSQL) with a table that is accessed by two applications. One adds records, the other should fetch new records when it knows that the last one has been added. The question is: how to implement this kind of trigger in the application and is it worth using such an approach at all?
Answer the question
In order to leave comments, you need to log in
postgresql has a notify command for feedback to the application. I saw a note on the net how to use it from Qt 5. I didn’t try it myself, I just saved it in my bookmarks just in case. See if it can help.
In general, the database should not report a change in its status, so the reading application should itself check with some frequency. That's all parsley
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question