Closed rfajarachmad closed 8 years ago
Have you put the db file inside www folder?
I have put the db file under www folder, I still didn't have any idea how solve this but I tried another way to open the database and It worked. Currently I am using this syntax :
window.sqlitePlugin.openDatabase( {name: "myDb.db", createFromLocation: 1} );
Hi @an-rahulpandey thank you for this awesome plugin, but I found an issue when using function sqlDB.copy(). I have a code like below :
console.log('Copying database'); window.plugins.sqlDB.copy("myDB.db", function() {
console.log('Opening database'); db = $cordovaSQLite.openDB("myDB.db");
});
when I run the application and watch the logcat. it looks like the application never execute $cordovaSQLite.openDB("myDB.db"); because I only see the console log 'Copying database' I didn't see the console log 'Opening database' and also for error message.
I am guessing there is a problem during copy db process but I didn't know what the error is. Could you please give me an advice ?? thanks.