Flávio Elorza Rodrigues Alves Error 10054 means for the "raiser" that the other side has closed abnormally the connection on its end, (own code, OS, firewall or router intervention). May be a timeout somewhere ?
I found solution: Server rest: function TServerMethods1.ComReflet(): TFDJSONDataSets; begin // Clear active so that query will reexecute. GetListaDeCartoes.Active := False; // Create dataset list Result := TFDJSONDataSets.Create; // Add departments dataset TFDJSONDataSetsWriter.ListAdd(Result, 'cartoes', GetListaDeCartoes); end;
Client Side: procedure TForm1.Button2Click(Sender: TObject); var DSList: TFDJSONDataSets; i:integer; begin FDMemTable1.Close; DSList := ClientModule1.ServerMethods1Client.ComReflet; FDMemTable1.AppendData( TFDJSONDataSetsReader.GetListValue(DSList, 0)); FDMemTable1.Open; for I :=0 to FDMemTable1.FieldCount-1 do begin FDMemTable1.Fields[i].DisplayName;
Flávio Elorza Rodrigues Alves Error 10054 means for the "raiser" that the other side has closed abnormally the connection on its end, (own code, OS, firewall or router intervention). May be a timeout somewhere ?
ReplyDeleteOn the client side or the server side ?
I found solution:
ReplyDeleteServer rest:
function TServerMethods1.ComReflet(): TFDJSONDataSets;
begin
// Clear active so that query will reexecute.
GetListaDeCartoes.Active := False;
// Create dataset list
Result := TFDJSONDataSets.Create;
// Add departments dataset
TFDJSONDataSetsWriter.ListAdd(Result, 'cartoes', GetListaDeCartoes);
end;
Client Side:
procedure TForm1.Button2Click(Sender: TObject);
var
DSList: TFDJSONDataSets;
i:integer;
begin
FDMemTable1.Close;
DSList := ClientModule1.ServerMethods1Client.ComReflet;
FDMemTable1.AppendData(
TFDJSONDataSetsReader.GetListValue(DSList, 0));
FDMemTable1.Open;
for I :=0 to FDMemTable1.FieldCount-1 do
begin
FDMemTable1.Fields[i].DisplayName;
end;
end;
Hi all
ReplyDeleteI found solution (I do not know if the best). In a 10 minute interval the client application performs any method in order to stay connected.