Hi,

I do not get any error message from SQLite. And the database only gets 
corrupted when the iDevice has to shut down due to battery issues. I have never 
had a customer complaining about a corrupt database during normal operation.

Regards,
Hartwig

> Am 13.08.2015 um 21:04 schrieb Simon Slavin <slavins at bigfraud.org>:
> 
> 
> On 13 Aug 2015, at 6:32pm, skywind mailing lists <mailinglists at skywind.eu> 
> wrote:
> 
>> Before my app closes I close the database explicitly. Though I do not know 
>> if this happens always when the iDevice shuts down due to battery issues.
> 
> iDevices shut down quite a time before they'd actually run out of power.  
> Before your device shuts down your App will get notified that it's going to 
> background, and then get notified that it's going to quit.  If you're 
> handling those two notifications properly (i.e. closing all SQLite 
> connections at one or the other) then you should not be getting database 
> corruption.
> 
> Things to check are running your App inside some sort of memory logger, e.g. 
> valgrind .  I don't know if this is possible on the Xcode simulator, I think 
> it's built in as a 'Tool'.  And also to check the values returned from /all/ 
> your SQLite calls, even ones like _close() where if they fail there's nothing 
> you can do about it.  If one of them is not SQLITE_OK then you should show an 
> error message.  The call which corrupts the database is sometimes an 
> apparently harmless call.
> 
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to