AnsweredAssumed Answered

When does the write to database happen

Question asked by tom.rippetoe on May 19, 2017
Latest reply on May 22, 2017 by tom.rippetoe

I am working on survey where users count the number of bike/peds encountered over a two hour period.  In planning for worst-case scenarios, my client is worried about losing data collected before submission of the survey. One scenario is that a user's device stops working (battery dies maybe) or the app freezes up after collecting, say, 1.5 hours of data.  In that case, would any of the survey data have been written to the sqlite database by then. Or does the write to the database happen only when the user clicks the 'done' button - and thus in my example scenario all the collected data are lost?


Any thoughts about ways to mitigate data loss when conducting a long-transaction type of survey?  We have played around a bit with regularly saving 'drafts' of the survey, but in the time it takes to stop, save, and restart the survey its possible that several to many bikes/peds passed without being counted.


Thank you