Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70919

Ionic 3 prepopulated database always create new db, it is unable to find from project directory in device

$
0
0

@vcass wrote:

private options = { name: “student.db3”, location: ‘default’, createFromLocation: 1 };

  this.sqlite.create(this.options).then((dmis_db: SQLiteObject) => {
    dmis_db.executeSql("SELECT* FROM tbl_student where studentId=?", [1]).then((data) => {
      alert("here")
      alert("inner inside" + data.rows.item(0).villageId)
      if (data.rows.length > 0) {
        // this.villageList = [];
        // for (var i = 0; i < data.rows.length; i++) {
        //   this.villageList.push({
        //     'valueInteger': data.rows.item(i).villageId,
        //     'text': data.rows.item(i).villageName

        //   })
        // }
      }
    }, error => {
      alert(JSON.stringify(error));
    })
  });

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70919

Trending Articles



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