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 Storage with SQLite

mDatasource

Why my mDatasource.open(); is getting error unhandled exception

2 Answers

Hamzah Iqbal
PLUS
Hamzah Iqbal
Courses Plus Student 2,529 Points

bump, i'm having the same issue. cant seem whats wrong?

There are two types of SQLException:

// Use this one
import android.database.SQLException;
// Don't use this one or you will get the unhandled SQLException error
import java.sql.SQLException;

Make sure you're using the first one not the second. Check your import statements to see which of these you're using. I hope this helps, message back if you have anymore questions.