0

I am using the sqliteJDBC library (SqliteDriver) in my Java desktop application to hook to my sqlite database.

Is there a way I can get the version of the database? This way I can know if I need to add missing tables based on the current database version

Thank you

PS: I am coming from android world where you can get the current version and "upgrade database". So I am assuming the database version is embedded in the db file/schema somewhere and can be queried

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Snake
  • 14,228
  • 27
  • 117
  • 250

2 Answers2

0

I think you can do it with openhelper, check here https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html

Bogdan Wood
  • 61
  • 1
  • 11
0

In the Android framework, the database version is just the value set with PRAGMA user_version.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • Does this exist in the database that I open with sqlite JDBC driver on Java J2se? Not Android – Snake May 27 '16 at 10:01
  • Did you see where the link goes to? – CL. May 27 '16 at 10:35
  • Yes the link goes to sqlite, but you said "in Android Framework" so that made me think if thats not accessable in Java framework, otherwise why mentioning android frame works – Snake May 27 '16 at 17:56