var sqlite = require("sqlite-sync"); //requiring
//Connecting - if the file does not exist it will be created
sqlite.connect("C:/Users/Taffarel/AppData/Local/codenotetx/notes_db.db");
// var rows = sqlite.run("SELECT * FROM users;");
var nome = "My Name";
var id = 1;
sqlite.run("UPDATE users SET name = ? WHERE id = ?;", [nome, id], function(ok) {
console.log(ok); //not return true if success, alws zero (false)
var rows = sqlite.run("SELECT * FROM users WHERE id = ?", [id]);
console.log(rows);
});
sqlite.close();
But when I open SQLite Studio, the data be updated.
There is an error trying to update some data