sqlite - window.openDatabase() not working in phonegap javascript -
i trying store files database using phonegap. getting error window object not support opendatabase. can give me solution? documents have read give same syntax. going wrong?
storeindb : function(csvbucketarr){ db = window.opendatabase("testdb" , "1.0", "testdb", 1000000); db.transaction(app.setup, app.errorhandler, app.dbready); console.log("db ready!!"); }, setup: function(tx){ tx.executesql("create table if not exists filelog(id integer primary key autoincrement, filename text unique, bucketname text not null)"); }, errorhandler: function(e){ alert("error :: " + e.message); }, dbready: function(csvbucketarr){ db.transaction(function(tx){ for(var in csvbucketarr){ var fname = csvbucketarr[i].filekey, bname = csvbucketsarr[i].bucketname; tx.executesql("insert filelog( filename , bucketname) values (?,?)", [fname, bname]); alert("in dbready"); } }, errorhandler, function(){alert("files added table");}); }
Comments
Post a Comment