1

I need help (Problem inside code.)

 var db = new SQL.Database(); //instead of creating a new Database , i want to access one.
 db.run("CREATE TABLE todos (id INTEGER PRIMARY KEY AUTOINCREMENT, item TEXT);");```
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Mr. Lima
  • 33
  • 8
  • 1
    Read the documentation for the sqlite bindings that you're using (sql.js?). There's presumably some way to tell it what database filename to use. If this is something run in a sandboxed environment like a web browser, you might be out of luck, though. Isn't there a javascript API for safely accessing a persistent database in such a case? – Shawn Aug 12 '21 at 22:57

0 Answers0