I’m working with briefcase files to store on the client side, tables that do not change often. I keep track of the last update date of these tables on the server, and on startup, I compare those dates to the local dates and decide which tables to reload from the server.
However, I’m now interested in the following use case from this article:
Request only the changed records for some huge table from the server side and then merge the delta with the client table loaded from the local briefcase.
Do you have any suggestions or samples on how to accomplish this? What I can think of is storing each delta in a table on the server, using the OnBeforeProcessChange event of the table’s business processor. Then, on the client, when I get the table the first time from the server, I’d load the table along with the date of the last known delta. Then, when I refresh the table on the client, I’d compare the dates of the last delta in the client and the server, and if they are different, get the missing deltas and apply them on the client.
Is this the best approach, or is there any other way to achieve this? Also, how do I store a delta in the database, and then apply it to the local data table once I retrieve the delta from the server?