diff --git a/src/android/io/sqlc/SQLitePlugin.java b/src/android/io/sqlc/SQLitePlugin.java index 432d36651..8e8c89d27 100755 --- a/src/android/io/sqlc/SQLitePlugin.java +++ b/src/android/io/sqlc/SQLitePlugin.java @@ -44,7 +44,7 @@ public class SQLitePlugin extends CordovaPlugin { * THANKS to @NeoLSN (Jason Yang/楊朝傑) for giving the pointer in: * https://github.com/litehelpers/Cordova-sqlite-storage/issues/727 */ - static Map dbrmap = new ConcurrentHashMap(); + Map dbrmap = new ConcurrentHashMap(); /** * NOTE: Using default constructor, no explicit constructor. diff --git a/www/SQLitePlugin.js b/www/SQLitePlugin.js index 497c30876..51ff64b8d 100644 --- a/www/SQLitePlugin.js +++ b/www/SQLitePlugin.js @@ -467,7 +467,16 @@ } } }; - cordova.exec(mycb, null, "SQLitePlugin", "backgroundExecuteSqlBatch", [ + cordova.exec(mycb, function(message){ + if(typeof result === "string"){ + console.log(result); + if (tx.error && typeof tx.error === 'function') { + tx.error(newSQLError(result, 0)); + } + + } + console.log('error in running backgroundExecuteSqlBatch'); + }, "SQLitePlugin", "backgroundExecuteSqlBatch", [ { dbargs: { dbname: this.db.dbname