I am trying to open a sqlite database in Android. On some older versions of Android I can not open the database and it is because the sqlite version. I know for sure that it works with sqlite 3.8.11. Here is how I open the database:
SQLiteDatabase db = SQLiteDatabase.openDatabase( "db path", null, SQLiteDatabase.OPEN_READONLY);
String[] arrayOfString = new String[1];
arrayOfString[0] = "address";
Cursor localCursor1 = db.query("messages", arrayOfString, null, null, null, null, null);
What do you think I should do for the older versions of Android?
I think that I can use org.sqlite.JDBC - http://ift.tt/1fOS9gr
This means that I have to import a jar. Do you know if there is a easier way to open that database?
Aucun commentaire:
Enregistrer un commentaire