You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to know how to load an external database with password protected. Currently I can load an external database without password protected, but trying to load a protected one:
a statement error callback did not return false: an unknown error was returned: code :0, sqliteCode:1, message: -
Here is my code
function OpenCustom(path, filename, key) {
var db = window.sqlitePlugin.openDatabase({name: filename, key:key ,androidDatabaseLocation: path},function () {
navigator.notification.alert('Database is queried');
db.transaction(
function (tx) {
tx.executeSql("insert into customerAccounts (firstname, lastname, acctNo) values ('firo"+Math.random()+"','fr"+Math.random()+"','"+Math.random()+"');",[],function(){console.log('ok')},function(statement,error){alert(JSON.stringify(error));});
tx.executeSql("SELECT * FROM customerAccounts;",[],function (tx, resultSet) {
for (var i=0; i<resultSet.rows.length; ++i){
$scope.clients.push(JSON.stringify(resultSet.rows.item(i)));
}
alert(JSON.stringify(resultSet.rows.length));
},function (tx,error) {
navigator.notification.alert('select error database'+JSON.stringify(error));
});
},function (error)
{
navigator.notification.alert('Populate database error: ' + error.message);
}
);
}, function (error) {
navigator.notification.alert('Open database ERROR: ' + JSON.stringify(error));
});
}
Using Cordova 6.3.1 deploying in Android 4.4.2.
Best regards
The text was updated successfully, but these errors were encountered:
This version will never support encrypted databases. Encrypted databases are supported by Cordova-sqlcipher-adapter. Combining SQLCipher encryption with user-specified Android database path is under future consideration.
I want to know how to load an external database with password protected. Currently I can load an external database without password protected, but trying to load a protected one:
Here is my code
Using Cordova 6.3.1 deploying in Android 4.4.2.
Best regards
The text was updated successfully, but these errors were encountered: