I'm attempting to update my database table with the following code:
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String query = "ALTER TABLE names ADD COLUMN hidden integer default 0";
dbHelper.getWritableDatabase().rawQuery(query, null);
}
However, when I start the application and it tries to upgrade the database I get the following exception:
...Caused by: java.lang.IllegalStateException: getWritableDatabase called recursively
Does anyone know how I can get around this issue and what exactly is causing it?
Thanks