On 01/09/10 18:58, Bill Brutzman wrote: > Mecki: > > I guess that a lot of programmers (perhaps most of them) write programs where > when editing say a new Customer... address, phone, etc... open a screen and > let the end user update the fields and then finish with a grand save... all > at once... on all the records (fields) for that customer. > > Of course, if the server goes down while the user is taking minutes to fill > in the screen, the user loses everything for that customer and then has to > start over with that customer.
Do they? > I prefer to save the entire record each time a field is changed. Granted, > this is a lot more writes to disk but it handles the given problem. If two > users are looking at the same data, their screens are updated following each > discrete transaction. > > I do like the given readu technique; I will consider using it. Thanks for > writing. > Why not do what a lot of nix programs do - flush the input data to a recovery file. Then, when the data gets flushed with a "grand write", wipe the recovery info. You just check, on going into the program, whether a recovery record exists, and take appropriate action. As an aside, when I wrote an accounts program, I got all the data from the user and didn't care that much about the up-to-dateness of the data displayed. What mattered was the amounts to be added/subtracted from the various ledgers. Then when they'd entered all the data and hit "commit", only then did I lock the records, REDO all the calculations, and write to file. Cheers, Wol _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
