Skip to main content
Inspiring
November 28, 2013
Question

AIR for IOS is automatically committing SQLite transactions on EXITING event

  • November 28, 2013
  • 0 replies
  • 324 views

I have a game going, using sqlite to track gameplay, and we dont want to save any incomplete rounds

eg, if the player starts a new round only gets halfway thru then quits the game, we want to *not save gameplay data for that round

so, I open a transaction at the start of each round, make various calls to the database, and commit the transaction when the round is complete

my assumption was that if the player hit the home button (app is set to exit on suspend) in the middle of a round, the data from that incomplete round would be lost (as desired) because the open transaction would not be committed, as the app would be shut down w/ no call to commit

unfortunately air/sqlite seems to auto-commit any open transaction on exit

can anybody verify this?

and, can anybody give me any advice on preventing this behaviour?

thanks

This topic has been closed for replies.