Problem with fuse-sqlite package

Hi everyone! Anyone can help me?. I’m reading a sqlite db with fuse-sqlite package. When a use db.query(“select * from xxxx”), Fuse Monitor show: Error message: no such table: xxxx. But the table exists!! I use “DB Browser for SQLite” (mac).

You should probably contact the author of that package on his Github account.

You are probably opening another file. How do you open the file? What is the full path of your database? What system are you testing on/deploying to when you experience problems?

The file is in the root project folder, same folder where is *.unoproj.

camina-app/ = project folder
camina-app/database.db = sqlite file

camina-app/Pages/SearchPage.js = this file open the db.

var sqlite = require(‘SQLite’);
var db =’…/database.db’);

There is another way to store local data?. I’m thinking use json file, is it possible to delete, update and insert items in json bundle file?

You are not opening the database in the root project folder. It is not accessible for the program. (Well it is in preview, but not easily.) You should probably use something like:

var db = sqlite.openFromBundle('database.db');, but be sure to include the database in your bundle.

There is no way to update a bundle file, they are all read only. You need to copy the file to your data directory, and update it there.

There are lots of examples of save and load JSON here on the forums.