Okay I fixed it. Not sure if the solution will apply to you.

In my 'onUpgrade' function the table name value was incorrect.

Basically it looks like you are not dropping the table you
subsequently then attempt to recreate. Check your defns.

Al.


On Oct 29, 8:16 pm, Frew <[EMAIL PROTECTED]> wrote:
> So I presume that no one else has seen this error?
>
> -fREW
>
> On Oct 27, 8:30 pm, Frew <[EMAIL PROTECTED]> wrote:
>
> > Ok, so everything that I've been doing with my db has been fine until
> > I changed it.  I made sure that the onUpgrade was right and I get
> > errors nonetheless.  Here is my method:
>
> >         @Override
> >         public void onUpgrade(SQLiteDatabase db, int oldVersion, int
> > newVersion) {
> >                 db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
> >                 db.execSQL("DROP TABLE IF EXISTS " + FIRST_RUN_TABLE);
> >                 onCreate(db);
> >         }
>
> > and here is the error:
>
> > android.database.sqlite.SQLiteException: Can't upgrade read-only
> > database from version 1 to 2
>
> > I can't seem to find my error.  Can you tell what I am doing wrong
> > here?
>
> > Thanks!
> > -fREW

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to