how to solving SQLiteFulException in greenDao when I delete record from table?
this is my stacktrace :
android.database.sqlite.SQLiteFullException: database or disk is full (code 13)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:437)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:522)
at de.greenrobot.dao.AbstractDao.deleteInTxInternal(AbstractDao.java:613)
at de.greenrobot.dao.AbstractDao.deleteInTx(AbstractDao.java:623)
this is my code for delete record from database :
QueryBuilder<TaskD> qb = getTaskDDao(context).queryBuilder();
qb.where(TaskDDao.Properties.Uuid_task_h.eq(keyTaskH));
qb.build();
getTaskDDao(context).deleteInTx(qb.list());
getDaoSession(context).clear();
This is unrelated to greenDAO. If your disk is full, it is full. You ran out of disk space. Depending on what you do, running VACUUM SQLite occasionally may defrag your DB.
From SQLite documentation
(13) SQLITE_FULL
The SQLITE_FULL result code indicates that a write could not complete because the disk is full. Note that this error can occur when trying to write information into the main database file, or it can also occur when writing into temporary disk files. Sometimes applications encounter this error even though there is an abundance of primary disk space because the error occurs when writing into temporary disk files on a system where temporary files are stored on a separate partition with much less space that the primary disk. https://www.sqlite.org/rescode.html#full
I guess application is installed on SDCARD or something.
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