0

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

4

1 回答 1

1

如果有人在寻找这个答案,那实际上是由于 MS ACCESS 处理正确并发的问题(特别是在写作环境中)。我们在标准 RDBMS(Oracle、MS SQL Server、PostgreSQL)上没有看到这种行为的证据。

除了放弃对该特定功能的访问支持外,我们别无选择。

于 2015-03-20T12:29:29.910 回答