Search code examples
delphidelphi-xe2firebirddatasnap

How does a client refresh the data on a server


I developed an Client/Server application, using datasnap. I need to know how to refresh the data on the server whenever a client has updated a table. The reason being that when I run a query on the client, after I inserted records into a table, the new records do not reflect in the queries.

Im using a firebird db, with datasnap, developing in Delphi XE2


Solution

  • Put a TTimer control on the client form and specify refreshing time frequency, change interval value as your needs, for example:

    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
    table1.refresh;
    end;