#Accessing Sqlite database file

7 messages · Page 1 of 1 (latest)

azure folio
#

Hello, I'm trying to get into Tauri but a must have is the simple access to Sqlite database files. I followed the guide for the Sqlite plugin and believe I have it installed / setup correctly.

The issue I'm running into now is that when I try to use a Select statement just to test reading from the database file, I get an error that the table is not found, even though I've verified it does exist using the Sqlite Database browser.

One thought I have is that perhaps when you run your Tauri app, is it building the project and making an empty copy of my database file thus resulting in the Table not be available at runtime?

Another is that perhaps I need to move the database file to the Public folder of the project? I tried this but then I can't seem to figure out what the relative path to the file is when it resides inside the Public folder. I get 'Unable to open database file' when using the path string of "sqlite:../Public/MarketDataDB.db"

Any help would be greatly appreciated!

austere nebula
#

the root dir of runtime of tauri dev, I think is the src-tauri or the parent of src-tauri

#

do you need modify the db at user side?

azure folio
#

Yes, the user would be adding new data / records to the database during runtime. Thanks I'll try to place it where you suggest.