I’m having some trouble to connect to SQLServer with Express. I realized that i’m using Windows Authentication instead of SQL Login.
const sql = require("mssql");
require("msnodesqlv8");
const conn = new sql.Connection({
database: "db_name",
server: "server_name",
driver: "msnodesqlv8",
options: {
trustedConnection: true
}
});
async function activeNumber(number: string){
console.log("ativiar nmr")
conn.connect().then(() => {
// exec query
});
}
I tried some ways to connect, but none worked.
New contributor
Pedro Morais is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.