I use this plugin: https://github.com/litehelpers/Cordova-sqlite-storage
I am doing the above problems in my project when executing database transactions. In fact, there are so many transactions in my project at the same time with js, as well as with the java end.
Below is my code (only one request):
function createTable(latWS,longWS,empId) {
window.sqlitePlugin.openDatabase({name: 'test.db', location: 'default'}, function(db) {
db.transaction(function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS test (loc_emp_lat, loc_emp_long, loc_emp_accuracy, loc_emp_local_time)');
}, function(err) {
console.log('Open database ERROR: ' + JSON.stringify(err));
});
});
setTimeout(insertIntoLogTable(latWS,longWS,empId),500);
}
I checked it will not be in the error message.
I use the version: cordova-sqlite-storage 1.4.7 "Plugin for storing sqlite cordons"
My Android version from Cordova: 4.1.1
source
share