I want to know why note table doesn’t create even there’s no error in the code!
Here’s my code:
var db = openDatabase("Schedular", "1.0", "schedualar database", 5*1024*1024);
db.transaction(function(tx) {
tx.executeSql("CREATE TABLE NOTES (NOTE_ID INTEGER PRIMARY KEY AUTOINCREMENT, NOTE_DATE INTEGER, NOTE_TIME datetime, NOTE_DESC varchar(500),ALERT_TIME INTEGER, NOTES_MORE_DETAILS varchar(1000))",function(tx){},onError);
});
function onError(tx, error) {
alert("Error Message: "+error.message);
}
Here’s the code in jsfiddle http://jsfiddle.net/m3jUd/
Your missing a parameter (2nd parameter). It should have an empty array since your not adding any values.
Since you wanted a success and error callback, you are missing the arguments array. Something like this should work.
Fiddle: http://jsfiddle.net/m3jUd/1/