Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48984

Change ionic database path 5

$
0
0

I am working with ionic 5 and sqlite and I need to know how I can change the default path in which the sqlite database is created on my device, since I currently do not know what the default path is and so far I have not found anything that can help me


this.platform.ready().then(()=>{

  if (!this.isOpen) {

  this.sqlite = new SQLite();    

  this.sqlite.create({ name: "data.db", location: "default",createFromLocation: 1 }).then((db: SQLiteObject) => {

  this.db = db;


      this.isOpen = true;

    }).catch((error) => {

      this._PresentacionService.presentAlert(error);

    })

  }

});

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 48984

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>