Issues connecting Node-RED to SQLite, encountering an error related to opening the database file despite correct paths

Hello, my first post here. I'm not sure if this is the right place to ask my questions, but I'm working on a project for college and this is my first experience with Node-RED. Right now, I'm trying to connect to SQLite, but I'm getting the following message in debug messages: "failed to open 'C:\PROTII_2024\ISEP_PROT_II.db'". I've checked the paths in the SQLite nodes and they are correct. I've also checked the security properties and everything seems to be correct in terms of permissions. I don't know what to do because I keep getting this error whenever I deploy, and I would like to resolve it. Thank you very much for your attention. I wish everyone a good rest of the day.

Node-RED v4.0.0
Node.js v20.15.0
Windows_NT 10.0.22631 x64 LE

Node installed in manage palette: node-red-node-sqlite 1.1.0

Use forward slashes.

The backslash in JS is intepreted as an escape (e.g. \n is a newline, \r is a carraige return etc)

alternatively, you can escape the backslash \\

I prefer regular slashes since it is compatible with *nix C:/PROTII_2024/ISEP_PROT_II.db

Lastly, ensure the account running node-red has read/write permission on the directory.

2 Likes

Bro, thank you very much. I can now at least connect to SQLite and that error has disappeared. Now I have another syntax error, but I'll try to solve it. The problem was the double quotes at the beginning and end of the path. Thank you very much for the quick response and attention given.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.