Skip to content

Ambiguous behaviour of the database when the database is deleted and recreated #20

Closed
@pankaj20aug

Description

@pankaj20aug

I use a SqliteOpenHelper to create a database (say "MyDB"). During a particular condition I have to clear the database. So I use context.deleteDatabase("MyDB") to remove the db and recreate it once again. But after this the database starts behaving erratically. For instance while fetching entries (using the same query) from the DB I get correct results during the first 2 times but 3rd time onwards I donot get any data.

On the other hand If I somehow manage to kill my app (using Task killer) and then repeat the above process everything works fine.

I have cross-checked my code a number of times and haven't found couldnot find any bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions