Hi,
I'm writing a program that operates on a subset of DB records from Firebird DB. I have to consider situation where the subset of records and final DB are connected remotely, e.g. through web-service.
I know that I can use TBufDataset in Lazarus. First I download a subset of records, make a temporary TBufDataSet locally, users modify the local copy, and then send it back. At server side, for insert or update, "update or insert" SQL statement based on primary key is good enough. But for deleting, I have to keep track of deleted records at the terminal side. So, currently if the size of subset is large, I delete all the records in server DB, and then insert all the records from terminal. If the size of subset is small, I delete / insert / update the server-side record as soon as the local record is modified.
My question is: Are there 1) better method that I don't know, or 2) any general rule for this case, or 3) What are the best approaches based on your experiences?
Many thanks in advance.