Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Data Persistence CRUD Operations with SQLite Opening the Database

Harley Privitera
Harley Privitera
13,316 Points

Where are the method names in PetSQLiteHelper.java documented?

Which helper method do I use to open the database in this challenge? I've tried a few different guesses based on MemeSQLiteHelper but I'm not having any luck.

CodeChallenge.java
PetSQLiteHelper petSQLiteHelper = new PetSQLiteHelper(context);
SQLiteDatabase database = petSQLiteHelper.getWriteableDatabase();

2 Answers

Hello,

You're so close to finishing this Task. The spelling you want is getWritableDatabase. For further reference, the documentation for the parent class is located here. If you need any more help, please let me know and i will try to assist further.

Harley Privitera
Harley Privitera
13,316 Points

Thank you James! I've been going crazy trying to figure this out; I knew that I had the right method, I was even looking right at it but I still got the spelling wrong :^/

Next time I'll cut/paste...

You're welcome. Have fun with Android development.