Hello, I’m novice in IONIC.
I’m trying open existing DB (SQLite) with a table and this table is populated with data.
I copy my DB into *www* folder directory of Windows10
My code:
this.sqlite.create({
name: ‘Keeper.db3’,
location: ‘default’,
DB is opened correctly (i have log) but there’s no data retrievend because rows.lenght returned is not greater than 0.
My Code:
str1: String;
let str1 = “select * from users”;
db.executeSql(str1, ).then(res => {
if (res.rows.lenght > 0)
{
alert(“there are rows”);
}
else
{
alert(“there aren’t rows”);
}
Can you help me?
1 post - 1 participant