TDAMemDataTable - reloading a single record in an already opened table

Hi,

I have a question regarding the partial reloading of an already opened remote data table.

If I have a tdamemdatatable that is opened (with dynamic where) and has retrieved a 100 (or 1000000) records, and another client updates one of those record, if there a way I get the local tdamemdatatable to only reload the changed records? Or do I have to reload all of the records.

regards

Justin.

Hello,

In order to reload only one record from server you could use RefreshRow method, but it refreshes current record, so you need to know what record was updated on the server. You could design your server in such a way, that it will call event on the client (http://wiki.remobjects.com/wiki/Event_Sinks_and_Server_Callbacks) with PK values of changed record, for example.

It is possible also to use RefreshFromServer method - it loads all the record from the server, but rewrite in TDAMemDataTable only changed records and inserts new ones.

Also, you could consider working with briefcases (http://wiki.remobjects.com/wiki/Working_with_Offline_Data_in_Briefcase_files_(Delphi) )

Best regards

Thanks for the response.

I ended up using a separate service with event sinks as suggested.

Is the second link you provided supposed to go to an empty page?

Part of the link is not recognized for some reason. So just add “(Delphi)” at the end of it. This is a link “http://wiki.remobjects.com/wiki/Working_with_Offline_Data_in_Briefcase_files_(Delphi)”.

A post was split to a new topic: The Event Sinks and Server Callbacks article