Hi everyone,

I'm just start learning Android and try to use SQLite.

I'm not using Eclipse (because of some reason) and use Android 1.6 SDK + JDK 
1.6 U 12 + Apache ANT.

I already can create the new project (helloworld), compile it, install it to 
emulator and run it on emulator.

Then I added 1 class to handle databases and compile it again and run it, and 
it works well.

Then I try to using SQLite API like this on my database handler :

 public HelloDb(Context ctx) {
        try {
            db = ctx.openDatabase(DATABASE_NAME, null);
        } catch (FileNotFoundException e) {
            try {
                db = ctx.createDatabase(DATABASE_NAME, DATABASE_VERSION, 0, 
null);
                db.execSQL(CREATE_TABLE_1);
            } catch (FileNotFoundException e1) {
                db = null;
            }
        }
    }

and also import the required library.

But when I compile it, I got error :
Cannot find symbol
db = ctx.openDatabase(DATABASE_NAME, null);
            ^

What I'm doing wrong?

Thanks before.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to