0
I’m facing problems with fields fkInternalCalc
when migrating from TClientDataSet
for TFDMemtable
.
We use these fields for data manipulation in memory, but they will not be persisted, this is very useful.
We have an applicationdatasnap
and created a generic method to recover aTFDJSONDataSets
.
procedure TProxyExec.Open(const DataSet: TFDMemTable; Query: String;
const TipoSever: TipoServerDB);
var
Dados: TFDJSONDataSets;
begin
try
GetDataSet(Query,Dados,TipoSever);
DataSet.Close;
DataSet.AppendData(TFDJSONDataSetsReader.GetListValue(Dados,0));
finally
FreeAndNil(Dados);
end;
end;
Everything happens as expected when theDataSet
passed as parameter does not have in yourFields
, one that is configured asfkInternalCalc
.
But when that happens, that is, when there is a fieldfkInternalCalc
previously created on FDMemtable
, when executing the line
DataSet.AppendData(TFDJSONDataSetsReader.GetListValue(Dados,0));
Debugger Exception Notification Programa.exe raised exception class FDException with message [FireDAC] [DatS]-38. Cannot change table [fdmTabela] structure, when table has rows'.
I debug using the.dcus
, did not reach a consensus. Someone has already gone through this?
We are using XE7 - Update1 Thank you!