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

Open existing DB

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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