Android SQLite3 corruption

Stacktrace

Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
	at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1048)
	at android.database.sqlite.SQLiteDatabase.openDatabaseEnc(SQLiteDatabase.java:1026)
	at android.database.sqlite.SQLiteDatabase.openOrCreateDatabaseEnc(SQLiteDatabase.java:1143)
	at android.app.ContextImpl.openOrCreateDatabaseEnc(ContextImpl.java:981)
	at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:966)
	at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:245)
	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:187)

Things that can go wrong

http://www.sqlite.org/howtocorrupt.html

Android deletes corrupt databases

http://stackoverflow.com/questions/7764943/what-can-be-done-about-the-fact-that-android-automatically-deletes-corrupt-sqlit?lq=1

Best Practices

http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android?rq=1

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>