The db contains 9 tables and has a size from 10mb. One table has 24500 records and seems corrupted.
The request "select * from
where .... order by [field1],[field2] limit 100" ends with the
error "database disk image is malformed...."
And now the horror !
In one case the database doesn´t exist after the request in the file.dirdefaultexternal and in the
other try the database exist, but the size is only 28KB and 5 from 9 tables MISSING !!
(for testing i have copied the saved 10mb database back)
the original db is self created througth the app and the copy is done with a standard filemanager app to a self created directoy in file.dirdefaultexternal
yesterday, i think an external power problem causes. the problem isn´t that the file is corrupt. this can be solved through export, create new db and import functionality.
!! The real problem is, that an easy READ request to this table with "select" KILLS/DELETE THE DATABASE or modify the physical size !!
I hope that the following help you for further projects.
BTW for restaurants etc my apps connect directly MySQL servers (onsite) rather than having all that data stored on a single device. If the end user is mobile (delivery company), my app stores the information locally on an SQLite database then synchronises to an MySQL database when the signal is at 50%. I just do not store large amounts of data on a single device, you never know what might happen.
Thx Peter, it´s an easy way to repair db´s. And you are right, if you say, the amount of record could be to big; and transfer the data to another "store".
But it doen´t explain the failure
!! The real problem is, that an easy READ request to this table with "select" KILLS/DELETE THE DATABASE or modify the physical size !!