Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Error TFDJSONDeltasApplyUpdates in TFDQuery with join between tables



Permlink Replies: 0
edmjunio edmjunio

Posts: 2
Registered: 7/6/05
Error TFDJSONDeltasApplyUpdates in TFDQuery with join between tables
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2018 8:37 AM
TFDJSONDeltasApplyUpdates in TFDQuery with join between tables does not work.

I'm use DataSnap Reflection (TFDMemTable in client)

DB: SQL Server
ERROR, <<...Invalid column name 'CODIGOAUXILIAR'..>>

fdqRelCirurgic -> updateoptions -> checkReadOnly = false
fdqRelcirurgic -> fields -> CODIGOAUXILIAR -> ProviderFlags = [] all = false

SELECT 
  ZA.IDITEM,
  ZA.AM_ID,
  ZA.IDPRD,
  ZA.IDLOTE,
  ZA.QUANTIDADE,
  TP.CODIGOAUXILIAR,
  TP.DESCRICAO,
  TL.NUMLOTE
FROM 
  ZA
  INNER JOIN TP ON ZA.IDPRD = TP.IDPRD
  LEFT  JOIN TL ON ZA.IDPRD = TL.IDPRD AND ZA.IDLOTE = TL.IDLOTE
WHERE
  ZA.AM_ID = :ID


 LApply := TFDJSONDeltasApplyUpdates.Create(ADeltaList);
  fdcConexao.StartTransaction;
  result := -1;
  try
    LApply := TFDJSONDeltasApplyUpdates.Create(ADeltaList);
    LApply.ApplyUpdates(0,fdqRelCirurgic.Command);  // <- The error is raised here.
    if LApply.Errors.Count > 0 then
    begin
      if fdcConexao.InTransaction then
        fdcConexao.Rollback;
      raise Exception.Create(LApply.Errors.Strings.Text)
    end
    else
    begin
      fdcConexao.Commit;
      Result := 1;
    end;
  Except
    if fdcConexao.InTransaction then
      fdcConexao.Rollback;
  end;


Edited by: edmjunio edmjunio on Jan 4, 2018 9:05 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02