Question…
A master detail like TChemical (ID, Name) and TIncompatibility (ID, ChemicalID, IncompatibilityID). (both TDAMemDataTables)
In TIncompatibility, fields ChemicalID and IncompatibilityID are both foreign keys to TChemical. TChemical is the master table, ID is the master field and ChemicalID is the detail field.
There is a third table TGridIncompatibility which shows the Name(s) of the IncompatibilityID('s) for a certain ChemicalID.
If I post a new record or an updated record to TIncompatibility (only local - no ApplyUpdates), how can I refresh the TGridIncompatibility? Is there a way that TGridIncompatibility shows the updates without applying the new/updated records to the server?
Probably you should add Name field into TIncompatibility table then.
Can you describe this issue in other words, like I update IncompatibilityID in TIncompatibility and TGridIncompatibility should reflect changes (what changes) ?
Indeed, TGridIncompatibility has the ID field of TIncompabitility, and a Name field which is ‘linked’ to the IncompatibilityID. (derived form TChemical).
SQL Statement (shortened)
WITH grdIncompatibilities AS (
SELECT INC.ID, CIN.ID AS IncompatibilityID, CIN.Name
FROM Incompatibilities INC
INNER JOIN Chemicals CIN ON CIN.ID = INC.IncompatibilityID
)
SELECT ID, IncompatibilityID, Name
FROM grdIncompatibilities
WHERE {Where}
So, if I update or insert a record in TIncompatibility, TGridIncompatibility should present the new or updated name of that record (even if that record is not yet available on the server).