When I initialize my Sqlite Database I make it as follows:
var db = window.openDatabase("Database", "1.0", "Cordova Demo", 20000);
db.transaction(populateDB, errorCB, successCB);
function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS TimeTable');
tx.executeSql('CREATE TABLE IF NOT EXISTS TimeTable (id INTEGER PRIMARY KEY AUTOINCREMENT, Day, Subject, StartingTime, EndingTime)');}
Now, I don't want the table to be dropped every time I call this function. But when I remove this line:
tx.executeSql('DROP TABLE IF EXISTS TimeTable');
An error shows:
[INFO] Error processing SQL: 1
Is there a solution for this ?