I am encountering an issue with multiple inserts in my code. Here is the snippet:
db.openDatabase({
name: "data.db",
location: "default"
}).then(() => {
db.executeSql(
+"INSERT INTO check_item (name) VALUES ('Pneus - calibragem'); "
+"INSERT INTO check_item (name) VALUES ('Pneus – banda de rodagem'); "
+"INSERT INTO check_item (name) VALUES ('Nivel do oleo'); "
+"INSERT INTO check_item (name) VALUES ('Luzes dianteiras'); "
+"INSERT INTO check_item (name) VALUES ('Luzes traseiras'); "
+"INSERT INTO check_item (name) VALUES ('Triangulo de sinalizacao'); "
+"INSERT INTO check_item (name) VALUES ('Chave de roda'); "
+"INSERT INTO check_item (name) VALUES ('Documentacao do veiculo'); ", {}).then((data) => {
console.log("TABLE CREATED: ", data);
}, (error) => {
console.error("Unable to execute sql teste", error);
})
}, (error) => {
console.error("Unable to open database", error);
});
Any suggestions on how to resolve this problem? Thanks in advance!