Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-09 Thread Simon Slavin
On 10 Sep 2018, at 12:30am, Robert Helmick wrote: > Thanks for your response. I'm using the node.js plugin. I've tried creating > a table then closing the db, and the queries executed successfully, but I > was not able to find the database file that it created. I searched the > folder structure

Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-09 Thread Robert Helmick
Hi Simon, Thanks for your response. I'm using the node.js plugin. I've tried creating a table then closing the db, and the queries executed successfully, but I was not able to find the database file that it created. I searched the folder structure and was unable to find any .db file, even though

Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-06 Thread Simon Slavin
On 6 Sep 2018, at 5:33pm, Robert Helmick wrote: > by default, then creates an empty database when it doesn't find the > pre-populated mydb.db file. This is why it can't find the 'plant' table, > because the newly created blank database obviously doesn't contain a > 'plant' table. However I can

[sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-06 Thread Robert Helmick
I'm receiving an error when I try to read from a pre-populated SQLite database: `sqlite3_prepare_v2 failure: no such table 'plant'` From what I understand SQLite looks for the mydb.db file in the /www folder by default, then creates an empty database when it doesn't find the pre-populated mydb.db

Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-05 Thread Chris Brody
Check the results of cordova plugin ls A common pitfall is that you have to use cordova-sqlite-ext plugin to get pre-populated database functionality. Commonly used cordova-sqlite-storage plugin does not support this feature. Second pitfall is if you have multiple Cordova sqlite plugins

Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-05 Thread Chris Locke
When SQLite creates an empty .db file, which directory is it in? With all your tweaking, etc, is the new database always in the same directory? Thanks, Chris On Wed, Sep 5, 2018 at 3:23 PM Robert Helmick wrote: > I'm receiving an error when I try to read from a pre-populated SQLite >

[sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-05 Thread Robert Helmick
I'm receiving an error when I try to read from a pre-populated SQLite database: `sqlite3_prepare_v2 failure: no such table 'plant'` From what I understand SQLite looks for the mydb.db file in the /www folder by default, then creates an empty database when it doesn't find the pre-populated mydb.db