Mega Search
23.2 Million


Sign Up

Make a donation  
Firedac fetches oudated values within a few seconds after up  
News Group: embarcadero.public.delphi.database.firedac

Hello,

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 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

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 15-Jan-2015, at 10:09 AM EST
From: smcom Software
 
Re: Firedac fetches oudated values within a few seconds afte  
News Group: embarcadero.public.delphi.database.firedac
Up?

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 22-Jan-2015, at 2:58 AM EST
From: smcom Software