Selecting string (TEXT)type of data from the table , the problem is when I select a single row of data the above error occured. There`s no problem when selecting all data from the table. There is an output also for the row length
Here is the snippet of my code
this.sqlite.create({ name: 'ionicdb.db', location: 'default' }).then((db: SQLiteObject) => { db.executeSql('SELECT * FROM carrots_expenses WHERE rowid = '+this._costID,{}) .then(res => { if(res.rows.length > 0){ console.log("Row length :" +res.rows.length); console.log(res.row.item(0).seedlings);
Output : [09:15:23] console.log: database already open: ionicdb.db
[09:15:23] console.log: Row length :1
[09:15:23] console.log: undefined is not an object (evaluating 'res.row.item')
SQLite Version : 5.6.0
ionic version : 5.6.0
mobile os : ios
desktop os : windows 10
Selecting string (TEXT)type of data from the table , the problem is when I select a single row of data the above error occured. There`s no problem when selecting all data from the table. There is an output also for the row length
Here is the snippet of my code
this.sqlite.create({ name: 'ionicdb.db', location: 'default' }).then((db: SQLiteObject) => { db.executeSql('SELECT * FROM carrots_expenses WHERE rowid = '+this._costID,{}) .then(res => { if(res.rows.length > 0){ console.log("Row length :" +res.rows.length); console.log(res.row.item(0).seedlings);
Output : [09:15:23] console.log: database already open: ionicdb.db [09:15:23] console.log: Row length :1 [09:15:23] console.log: undefined is not an object (evaluating 'res.row.item')
SQLite Version : 5.6.0 ionic version : 5.6.0 mobile os : ios desktop os : windows 10