I create a database in a phonegap application (android) and populate it with test values.
var db = window.openDatabase("achievements", "1.0", "AchievementsDB", 1000);
db.transaction(createTables, function(tx, error){
console.log("Error Creating Tables: "+error);
}, function(){
console.log("Successfully created Tables in Database");
});
here is the createTables function
function createTables(tx){
tx.executeSql('CREATE TABLE IF NOT EXISTS Achievements (name unique, description)');
tx.executeSql('INSERT INTO Achievements (name, description) VALUES (0, 1)');
tx.executeSql('INSERT INTO Achievements (name, description) VALUES ("good", "morning")');
}
the problem is. I always get the error Callback back. When I try a SELECT on the database it always says the retrieved data (the result data) is undefined. Also, I was wondering why I can´t access the data/data/mypackage/database folder of the phone (actually, DDMS just shows an empty data folder).
I really dont know anymore what´s the problem here I really googled and stackoverflowed a lot about this. Please give any help.