I'm getting the following error:
android.database.sqlite.SQLiteDiskIOException: error code 10: disk I/O error
at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:92)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1926)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1866)
I only get this error on ICS 4.0.1 on a Samsung Nexus phone. On an emulator, a Motorola Xoom 3.2 and an HTC Desire 2.3.3, the code works fine. My code is targeted at version 8, or 2.2.x, of the SDK. The execSQL
is executed as follows:
db.execSQL("DROP TABLE IF EXISTS " + table.getTableName());
The database is stored internally and not on an SD card. Any suggestions on how to solve this problem?
Solved this.
Problem was that prior to the drop table statements there was a Context.deleteDatabase('dbName')
statement which had obviously removed the db, and the I/O error being reported then makes perfect sense.
It seems that a belt and braces approach had been used previously (unnecessarily).
However the interesting thing is that this didn't manifest as a problem until the move to ICS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With