Create Table On Upgrade
I have been trying to get this right but i dont know what i am missing. I have an android app and I wish to add 1 more table to it.However i am not able to do it and I have no Exce
Solution 1:
I strongly encourage you to switch to SQLiteAssetHelper
, which has the whole package-the-database-in-the-app pattern worked out.
Tactically, you are not committing your transaction. The proper recipe for multi-statement transactions is:
try {
db.beginTransaction();
// do SQL here
db.setTransactionSuccessful();
}
finally {
db.endTransaction();
}
Without the setTransactionSuccessful()
call, endTransaction()
will do a ROLLBACK
.
Post a Comment for "Create Table On Upgrade"