Open external database (SQLite) Ionic 3

0

I have a SQLite database with multiple tables and one of them is updated with many items from the click of a button, due to long waits that revolves around 30 minutes, one solution is to download the meubanco file. db, I can download the file through the File plugin.

I tried to put the download in the internal folder of the application with applicationDirectory , says to have successfully gone to the folder /file but when going in there is nothing. Because of this the download is made to a folder that I create but I still can not read the database with the SQLite .

getDBProdutos() {
    return this.sqlite.create({
      name: 'meubanco.db',
      location: '${this.file.externalRootDirectory}meusbancos',
    })
  }

The following error is generated:

  

Error: Valid iOS database location could not be determined in   openDatabase call       at newSQLError (SQLitePlugin.js: 26)       at Object. (SQLitePlugin.js: 581)       at Object.openDatabase (SQLitePlugin.js: 59)       at vendor.js: 86985       at new t (polyfills.js: 3)       at SQLite.create (vendor.js: 86984)       at SQLite.value [as create] (vendor.js: 150518)       at DbInvGeralService.webpackJsonp.47.DbInvGeralService.getDBProducts   (main.js: 2919)       at DbInvGeralService.webpackJsonp.47.DbInvGeralService.selectDbProducts   (main.js: 2926)       at ColetaPage.webpackJsonp.225.ColetaPage.European search (main.js: 951)

    
asked by anonymous 02.03.2018 / 13:32

0 answers