In the begininng of my app, i am running a sqlite3 command on existing sqlite3 DB.
The command goes like that:
sqlStmt = "ALTER TABLE projects ADD COLUMN guid integer DEFAULT 0";
if (sqlite3_prepare_v2(db, sqlStmt, -1, &compiledStmt, NULL) == SQLITE_OK){
sqlite3_step(compiledStmt);
}
what happens is that all my data is lost, and a “journal” file is showing (and never deleted).
I don’t what to do – i understand it has something to do with transactions and locking.
Please help.
This is a normal behavior since Sqlite doesn’t support complex operations.
Please, refer to the documentation.
So, all you have to do is :
If you want more help, give us your table structure.