HI, All
1) If SQLite table format is has to be changed, but an app is already widely used - how to update the db structure preserving the current tables' data?
2) Is it possible to catch SQL runtime error like
?
1) If SQLite table format is has to be changed, but an app is already widely used - how to update the db structure preserving the current tables' data?
2) Is it possible to catch SQL runtime error like
B4X:
Dim sms_sent As Int = Starter.SQL.ExecQuerySing
android.database.sqlite.SQLiteException: no such column: sms_sent (code 1): , while compiling: SELECT sms_sent FROM orders WHERE id = '1'
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(no such column: sms_sent (code 1): , while compiling: SELECT sms_sent FROM orders WHERE id = '1')
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1008)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:573)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1711)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1650)
?