Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Use a database with data

$
0
0

Hello, I have a problem, I want a database with dates, I saw the code and supposed to

this.sql = new Storage(SqlStorage, {name: "my.db", existingDatabase: true});

I can use my.db with my data, but when I do:

  this.sql.query("SELECT * FROM test").then((data) => {
    console.log('select');
    }, (error) => {
        console.log(JSON.stringify(error.err));
  });

in have:
{"code":5,"message":"no such table: test"}

This is in the ios emulator and ios device. (The file my.db is in www folder)

Any help?

Thanks and sorry for my english :S


Viewing all articles
Browse latest Browse all 228595

Trending Articles



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