A POS system that I wrote saved a few arrays and text on exit. It worked beautifully in 99.9% % of the time but every so often the user would start up and the file was corrupted some how - I saw the tilde file (exactly as word does (used to do it?), when view extensions for known file type was enabled in windows.
The thing I couldn't figure was that people using it for over 2 years never had a problem, another shop that had three of my POS systems NEVER had a problem there were basically at most 5-7 sites that had the problem - rarely (once or twice a year - then never again) but two machines were corrupting every month or so it seemed). I checked to see if they switched off without exiting - but I know that in 99.99% of cases you could do that without corrupting. All the machines run windows 7 embedded and of course I switched off updates (if it works today it will work tomorrow - I threatened them with death if they installed anything or used the internet on it). There was no rhyme or reason to the corruption, as one of the shops had 2 machines bought at the same time and the one was corrupting consistently and the other wasn't. In the end I just created another table in the sqlite database and saved the encoded arrays in there - never a problem since. Lesson learned (by me at least) it's not worth the aggro, the coding is not that much more involved so why bother unless it's for my own use as I have full control? Although I have teamviewer on each machine - talking somebody through connecting the device to the internet after they have changed ISP or other reasons meant too much wasted time explaining what and where a status bar was/is "Every time I make my program fool proof the universe comes up with a better fool" Lagi On Thu, 17 Jan 2019 at 01:11, Richard Gaskin via use-livecode < [email protected]> wrote: > Curry Kenworthy wrote: > > > Although it's quite possible to save data in stack file(s) if you do > > it properly, people who follow that route often have trouble, so I > > discourage it. > > Depends what's in the stack file. > > The traditional factoring of code, UI, and data became a best practice > for good reason. > > But stack files can be very versatile storage containers, offering many > of the benefits of LSON (LC encoded arrays) but with the addition of > being able to contain LC objects as well. > > LSON's generally my go-to unless I have a specific need for something > else, but once in a while stack files have been a good solution for > storage. > > There are many storage formats to choose from, and stack files have a > place among them. For keeping with the tradition of separating code, > UI, and data, it's not the format but how it's used. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > [email protected] http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
