I have a DataSnap Server
with two TFDQuery's
via TFDConnection
to a MySQL
database.
This querys are in a master/detail relationship
via a TDataSource
(neested datasets). This data is exported via one TDataSetProvider
.
In the client side, I have a TDataModule
with one TSQLConnection
, one TDSProviderConnection
and two TClientDataSet's
, one for the Master
and the other for the Neested Detail
via DataSetField
property.
When i test my client everything works fine.
The problem is when two clients
are working simultaneously
over the same detail record, the data I write to one Detail in one Client is not seen from my second Client, and vice versa.
Suppose we have this scenario with a simple bill/items relationship: Bill1, Item1, OriginalData
if i read Bill1 in both clients, both read the same data.
If i modify the OriginalData to ModifiedData in my First Client, and execute ApplyUpdates
, it works fine, but then i refresh the same Bill1 in my second Client, and still reading the unchanged OriginalData
If I write data into the MasterTable
everything works fine, buy with my DetailTable
it seems to get data from some cache or something. I reproduce all via BDE
components and Paradox
database and have no problems, but we need to use FireDac
and MySQL
So, here is the question... ¿Why the data written to detail record in the first client is not seen from my second client after calling refresh with DataSnap
via FireDac
and MySql
?
I'm using Delphi Xe5 update 2.
Note: The Master/Detail
is a parametrized Query
, so only one Bill is active at a time.
Once again, sorry for my poor english.