Issues with storage of data in stack

Lagi Pittas iphonelagi at gmail.com
Thu Mar 8 12:03:52 EST 2018


Hi Mike,

I have 60+ machines running windows7  embedded  running a POS/TILL
system also a few  tablets running windows and android with the same
system - wth abouth 8 lines of code added to work on Android.

 In the first version of the system I save the arrays which held all
the Clerks orders/totals etc and items into an external stack every
time they added an item.

I then saved the whole thing and cleared the  "dirty" flag   on shutdown.

If the"till"  program started and the dirty flag was true then system
would know it was a powercut and load all the "open"  orders and other
status information  etc.

I have users who have not had a problem in over 2 and a half  years
others who have 3 "tills" with no problems and just a few maybe (4 who
have had a corrupt stack maybe 1 to 3 times a years - 2 or three times
is  too many. There is no rhyme or reason because others have had
powercuts (6 in an hour ) with no damage but others can can switch off
without exiting the till properly without a problem and yet I can have
a corrupt stack with everything shut down properly.  So Now I have
removed that stack and  just save the arrays to  "general" config
table called TABS in sqlite in a row with an idkey of '99' other
IDkeys can save other configuration information- NOT ONE PROBLEM since
I have done this - go figure.

I'll make a posting on the forum with the code - not trying to teach
my granny to suck eggs here, but maybe some beginners on the forum
might find it useful - would have done in the beginning.


http://forums.livecode.com/viewtopic.php?f=7&t=30717

Regards lagi

On 7 March 2018 at 20:30, Mike Kerner via use-livecode
<use-livecode at lists.runrev.com> wrote:
> I'm working on a session for next week's LCG.  We are all working on
> fun super-advanced pushing-the-envelope things in LC, but I wanted to do
> something for the beginners who are watching LCG, and handling data seemed
> like an obvious choice.
>
> I have to admit, I haven't stored data in a stack in a long time, since the
> database options are so easy to use.  If you're currently storing data in a
> stack, have you run into any issues on any platform with it, especially on
> mobile, for instance, where the rules can be a little weird?
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the Use-livecode mailing list