Dear all,

I am facing an issue (probably simple to solve!) while migrating my
app under the last 0.9.

Before I was creating and then opening a database.

In teh doc I read I saw that now I need to create a class that
inheriths from SQLiteOpenHelper.

This is what I have done (anonymous class inside a new one) :
------------------
    class MyDBHelper extends SQLiteOpenHelper {

        public MyDBHelper(Context context, String name, CursorFactory
factory, int version) {
            super(context, name, factory, version);
        }

        public void onCreate(SQLiteDatabase db) {
            return;
        }

        public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) {
            return;
        }

    }

----------------

Then I instanciate this class

 dbHelper = new MyDBHelper(launched, Constant.DB_DATABASE_NAME, null,
Constant.DB_VERSION);

-----------------

Now comes the issue, I'd like to execute a SQL request to my DB :
myDB = dbHelper.getWritableDatabase();
            myDB.execSQL("DELETE FROM " + Constant.DB_TABLE_STATIONS +
" WHERE " + Constant.DB_FIELD_S_NETWORK + "='" + network + "';");

And I have this error ?

08-20 18:07:41.119: ERROR/Database(172): sqlite3_open_v2("/data/data/
com.xirgonium.android/databases/myDB", &handle, 6, NULL) failed

------------------

Do you have an idea of the origin ??

Thanks a lot for your help !


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to