I'm currently maintaining a Client / Server (over TCP) system. The server can be accessed by multiple clients (few dozens at most) so i set up a connection pooling like FireDAC allow us to do. It works just fine in most cases. I'm still having one issue :
When one of my client applications call a "writing" function ( nb : a function that implies writing to the database ) and then immediately after call for a reading function on the same ressource, it gets outdated value ( the value before the previous update ). This result goes on for a few seconds/hundreds of milliseconds, then the results come back good, as if the process wasn't completely over on the driver layer. The same behaviour is observed with an INSERT query.
The weird thing is that the TFDQuery i'm using to update the DB (through it's .Post function) return quite quickly as if the process was over. I am not using amNonBlocking parameter but the default value (amBlocking). I think the natural behaviour would be that the .Post function only return when the data has been fully updated but apparently not. Is that a FireDac issue? is that a Jet engine issue? Is using RecordLocking the way to go? I believe it's risky as I need to keep the same behaviour on 4 DBMS including MS-ACCESS. I'm currently using Delphi XE6 with a MS-ACCESS database but my app needs to be able to run on Oracle, MS SQL and PostgreSQL too.
Thank you very much