what version of sqlite i should use, if i target android 2.2 -


currently using sqlite 2.0 because book using learn uses sqlite 2.0. find other new versions. there mapping android 2.2 should use version kind of thing.

private static final int database_version = 2; @override public void onupgrade(sqlitedatabase db, int oldversion, int newversion) { log.w(tag, "upgrading database version " + oldversion + " "     + newversion + ", destroy old data"); db.execsql("drop table *"); oncreate(db); } } 

above code found in study material, tells db version 2. may know version denoting to, @gregory link tells android starts sqlite version 3.4.

i know when upgrade method comes place or when should used

thanks

the documentation states can use version 3.4.0 :

android ships sqlite version 3.4.0

apparently that's minimum version, , devices use updated version of sqlite. people listed sqlite versions encountered in question : version of sqlite used in android?

edit : version number hardcoded number database. when decide update database include new tables/columns/whatever, can increment database number, , when android loads database method gets called update if needed (comparing old stored database version new one).


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -