private options = { name: “student.db3”, location: ‘default’, createFromLocation: 1 };
this.sqlite.create(this.options).then((db: SQLiteObject) => {
db.executeSql("SELECT * FROM tbl_student where studentId=?", [1]).then((data) => {
if (data.rows.length > 0) {
this.studentList = [];
for (var i = 0; i < data.rows.length; i++) {
this.villageList.push({
'valueInteger': data.rows.item(i).studentId,
'text': data.rows.item(i).studentName
})
}
}
}, error => {
alert(JSON.stringify(error));
})
});
~ no such table:tbl_student,‘code’:5
~Plugin used is cordova-sqlite-ext 3.0.0 “Cordova sqlite storage plugin with extra features”
Need every one support to access the prepopulated database in ionic 3.
Thanks