Helper cannot query (table cannot be found) after delete old DB and create new one

4 views
Skip to first unread message

Võ Hoàng Long

unread,
May 25, 2016, 5:17:04 AM5/25/16
to ORMLite Android Users
Hi all, 

I have a circumstance that after uninstalling app then re-install it again. After re-installing, the first time app launches, the helper cannot found any table. But the second launching is ok.

About the database, I have added a sqlite db file into the Assets folder the using the InputStream and OutputStream to copy the db on Assets folder into the App db. And if the db is existing, I will delete it (by context.deleteDatabse()) and create new one.

While debugging, on OnCreate method, I found that after uninstalling app, the db is also existing but empty.

Please help:
 + Why after uninstalling app, the db is also existing.
 + How to fix the issue that the helper cannot found any table in the first time app launches.

Best regards,
Long Võ

Reply all
Reply to author
Forward
0 new messages