Shrinithi
Shrinithi

Reputation: 336

Null pointer exception in getWritableDatabase();

In my app I am using dbhelper class, insertion into the db works fine and I can access the table contents, the problem is when I call the insertion method for the second time from another activity am getting null pointer exception in getWritableDatabase(). can someone help me in fixing this bug?

Upvotes: 0

Views: 207

Answers (1)

manishpro
manishpro

Reputation: 141

May be second time , you are opening the DB as getreadable and not closing that.I did this mistake in past and got the above error.

Upvotes: 1

Related Questions