On a single-page subfile, when the user rolls up or down for the next or previous page, data changed on the current page MUST be validated and applied to the database first. This reduces latency.
With extending or load-all subfiles, paging does not pass control back to the program (except on roll up from the current last page of a self-extending subfile, but that is irrelevant for this discussion). So a long time can pass before changes made to the subfile data get to be validated by your program, and applied to the database. This can cause problems, and can frustrate users who may think that the act of paging has applied the updates (out of sight, out of mind -- and then they press F3).
Whatever method you use, you need to check whether data has been changed by another user or process before you apply valid changes -- if a record changed by the user (in the subfile) has been changed elsewhere since it was put in the subfile, you could flag this as a non-fatal error, highlight the record, and give the user the option to apply his change regardless or insist that he refreshes the screen to see what the data looks like now.
Change detection methods are easier to work with on a single-page subfile, and you are likely to get fewer change clashes anyway and better user satisfaction.
You can get away with a self-extending subfile for updates, if it's unlikely that update clashes will occur.
Please, don't use load-all subfiles. Not just for updates, but for anything, unless the amount of data will always be very small. Anyway, once you have a working self-extending subfile program, you will copy it for everything else and never go for load-all again.
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in April 2005