Category : sql-server

I am getting (this.parent.acquire is not a function) error in the following code app.post("/add", (req,res) => { const config = { server: ‘server’, //update me user: ‘user’, //update me password: ‘pass’, //update me database: ‘db’, trustServerCertificate: true } let pool2 = sql.connect(config) try { const transaction = new sql.Transaction(pool2) transaction.begin(err => { if(err) { console.log(err); ..

Read more

i tried to perform this const sql = require(‘mssql’); const {database} = require(‘../keys’); sql.connect(database, function (err,con) { if (err) throw err; console.log("Connected!"); var sql = "INSERT INTO LOGIN (username, clave) VALUES ?"; var values = [ [‘John’, ‘Highway 71’], [‘Peter’, ‘Lowstreet 4’], [‘Amy’, ‘Apple st 652’], [‘Hannah’, ‘Mountain 21’], [‘Michael’, ‘Valley 345’], [‘Sandy’, ‘Ocean blvd ..

Read more

I am working on an app where I have to connect and perform queries on an SQL server using Sequelize. I have created migrations, seeders, and models using sequelize init but now when I tried to create an object of models using const db = require("./models") it is throwing error like D:Code Practiceexpress-sequelize-demonode_modulestediouslibtokenstream-parser.js:85 static async ..

Read more