I never used dataabstract(i have license).
So i want to use It now…
I Need to understand some steps.
I have 2 clients connected with server.
I insert new record in client 1 but It doesn t update automatically in client 2. How can i do to update client 2?
Each 1 hour i Need to update database from server side.it Is possible? Or i Need create client side at same server project?
if you want to update only a part of records, you can specify set DynamicWhere expression.
for example, you have the LastUpdated field in table so you can specify a new condition where LastUpdated will be great that specific timestamp.
don’t forget to return DynamicWhere to original state.
the same as on client-side via table: TDAMemDataTable should be linked to TDALocalDataAdapter (LDA) in the same was as to TDARemoteDataAdapter (RDA). LDA should be linked to DataService. if you wants to put logic into the same DataService, you may link as LDA.ServiceInstance := Self;.
After this use usual table.Insert/table.Post;
manually, via SQL.
it can be like
ic := Connection.NewCommand('insert .....', stSQL);
ic.RefreshParams; // if needed
ic.ParamByName('...').Value := ...; // if needed
Connection.BeginTransaction;
try
ic.Execute;
Connection.CommitTransaction;
except
Connection.RollbackTransaction;
exd;
we haven’t done this automatically, so timer solution will work
You can add some custom logic to server to store timestamp of last update from any client.
for example, this method service methods will return this info:
function LastUpdated: TDateTime;
if correspondent value differ on client-side, server has some updates.
by other side, you can store more info on server-side like new/changed/deleted PK and give to client additional info …